Perl6 module to use the Discord API
Perl 6
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Name Discord

Discord is an application that provide text and voice channel. see

There is still a lot of thing to do with this module. I use the Go library as a reference for the Discord API ( Since the official documentation is quite sparse.

For now it does not support the Websocket API, so you are working with only the REST API


This is an example from the examples directory

use Discord;

#This small example allow me to send message to a channel by talking in private with
#This client
my $disc =;

#The login method do a lot of work for you, like checking the opened private channel
#And getting the guilds you are part of. It also gather the channels of each guilds.

$disc.login(@*ARGS[0], @*ARGS[1]);

#Every call to get message without argument give the "historic" of the channel
#So we keep the last msg to keep his ID
my @msg = $disc.get-messages($<Skarsnik>);
my $last-msg = @msg.tail[0];

react {
  whenever Supply.interval(5) {
    #We only want new message
    @msg = $disc.get-messages($<Skarsnik>, :after($;
    for @msg -> $msg {
      say $msg.perl;
      $disc.send-message($<QuillnBlade><qnb-general-sfw>, $msg.content);
      LAST {
        $last-msg = $msg;


This software is under the same licence as Rakudo, see the LICENCE file