Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vKxni committed May 5, 2021
1 parent 9954996 commit c77052c
Show file tree
Hide file tree
Showing 14 changed files with 596 additions and 5,066 deletions.
Binary file added Bot.sqlite
Binary file not shown.
24 changes: 24 additions & 0 deletions discord-t/cc.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use AnyEvent::Discord::Client;

my $token = 'NzkyNjk2NTgyMzk0MDg1Mzk3.X-heOA.d0EK4DK2pvjZlmF26g8_Wa3rQFM';

my $bot = new AnyEvent::Discord::Client(
token => $token,
commands => {
'commands' => sub {
my ($bot, $args, $msg, $channel, $guild) = @_;
$bot->say($channel->{id}, join(" ", map {"`$_`"} sort grep {!$commands_hidden{$_}} keys %{$bot->commands}));
},
},
);

$bot->add_commands(
'' => sub {
my ($bot, $args, $msg, $channel, $guild) = @_;

$bot->say($channel->{id}, ", $msg->{author}{username}!");
},
);

$bot->connect();
AnyEvent->condvar->recv;
2 changes: 2 additions & 0 deletions discord-t/net.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use AnyEvent::Discord::Client;
$mybot @_ client()
2 changes: 1 addition & 1 deletion ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
apps: [
{
name: "Koni's 2nd bot",
name: "Koni's bot",
script: ".",
//options reference: https://pm2.keymetrics.io/docs/usage/application-declaration/
autorestart: true,
Expand Down
Loading

0 comments on commit c77052c

Please sign in to comment.