AnyEvent-Discord

 view release on metacpan or  search on metacpan

doc/AnyEvent-Discord.md  view on Meta::CPAN


- users

    Available/created/seen users

# PUBLIC METHODS

- new(\\%arguments)

    Instantiate the AnyEvent::Discord client. The hashref of arguments matches the
    configuration accessors listed above. A common invocation looks like:

        my $client = AnyEvent::Discord->new({ token => 'ABCDEF' });

- on($event\_type, \\&handler)

    Attach an event handler to a defined event type. If an invalid event type is
    specified, no error will occur -- this is mostly to be able to handle events
    that are created after this module is published. This is an append method, so
    calling on() for an event multiple times will call each callback assigned. If
    the handler already exists for an event, no error will be returned, but the

lib/AnyEvent/Discord.pm  view on Meta::CPAN


=back

=head1 PUBLIC METHODS

=over 4

=item new(\%arguments)

Instantiate the AnyEvent::Discord client. The hashref of arguments matches the
configuration accessors listed above. A common invocation looks like:

  my $client = AnyEvent::Discord->new({ token => 'ABCDEF' });

=item on($event_type, \&handler)

Attach an event handler to a defined event type. If an invalid event type is
specified, no error will occur -- this is mostly to be able to handle events
that are created after this module is published. This is an append method, so
calling on() for an event multiple times will call each callback assigned. If
the handler already exists for an event, no error will be returned, but the



( run in 0.349 second using v1.01-cache-2.11-cpan-64827b87656 )