AnyEvent-Discord-Client
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AnyEvent/Discord/Client.pm view on Meta::CPAN
# register "!hello" command
'hello' => sub {
my ($bot, $args, $msg, $channel, $guild) = @_;
$bot->say($channel->{id}, "hi, $msg->{author}{username}!");
},
);
=item C<api(I<$method>, I<$path>, I<$data>, I<$cb>)>
Invokes the Discord API asynchronously and returns immediately. C<$method> is the HTTP method to use; C<$path> is the endpoint to call. If C<$data> is a reference, it is sent as JSON; otherwise, if it is defined, it is sent as a C<x-www-form-urlenc...
=item C<api_sync(I<$method>, I<$path>, I<$data>)>
Invokes the Discord API synchronously and returns the result of the call. C<$method> is the HTTP method to use; C<$path> is the endpoint to call. If C<$data> is a reference, it is sent as JSON; otherwise, if it is defined, it is sent as a C<x-www-f...
=item C<websocket_send(I<$op>, I<$d>)>
Sends a raw WebSocket payload as per the L<Discord Gateway|https://discordapp.com/developers/docs/topics/gateway> documentation.
=back
=head1 AUTHOR
Eric Wastl, C<< <topaz at cpan.org> >>
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.141 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )