TTP::Request::Common qw(POST);
use AnyEvent::HTTP::MultiGet;
use AnyEvent::WebSocket::Client;
use JSON;
use namespace::clean;
use IO::Socket::SSL;
our $VERSION='1.0005';
BEGIN {
no namespace::clea
$json,$conn_data)=@_;
if(exists $json->{type} and $json->{type} eq 'desktop_notification') {
my $ref={
type=>'message',
bot_id=>$sb->bot_id,
channel=>$json-
text=>'this is a test',
subtype=>'bot_message',
};
print Dumper($json,$ref);
$sb->send($ref);
}
},
);
my $result=$sb->connect_and_run;
die $re