-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathetc.ts
41 lines (36 loc) · 989 Bytes
/
etc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {
command,
default as CookiecordClient,
Module,
listener,
} from 'cookiecord';
import { Message } from 'discord.js';
import { pingPong, dontAskToAsk, reactfcMsg } from './msg';
export class EtcModule extends Module {
constructor(client: CookiecordClient) {
super(client);
}
@command({ description: 'See if the bot is alive' })
async ping(msg: Message) {
await msg.channel.send(pingPong);
}
@command({ description: 'Sends a link to <https://dontasktoask.com>' })
async ask(msg: Message) {
await msg.channel.send(dontAskToAsk);
}
@command({
description:
'Sends a link to <https://github.com/facebook/create-react-app/pull/8177#issue-353062710>',
})
async reactfc(msg: Message) {
await msg.channel.send(reactfcMsg);
}
@listener({ event: 'message' })
async onMessage(msg: Message) {
if (msg.author.bot || !msg.content.toLowerCase().startsWith('poll:'))
return;
await msg.react('✅');
await msg.react('❌');
await msg.react('🤷');
}
}