type
This commit is contained in:
parent
34642dfbd4
commit
83dea73e77
12
src/index.ts
12
src/index.ts
|
@ -38,12 +38,13 @@ const RE_FLAG = /^--\S+(=.*)?$/g;
|
|||
const RE_FLAG_NAME = /^--[^=\s]+(=*?|$)/g;
|
||||
const DB_FILE = process.env.DB_FILE || './db.json';
|
||||
const RE_USER_MENTION = /^<@[0-9A-HJ-KM-NP-TV-Z]{26}>$/i;
|
||||
const PUBLIC_COMMANDS = ['suicide', 'status', 'help'];
|
||||
const PUBLIC_COMMANDS = ['suicide', 'status', 'help', 'type'];
|
||||
const COMMANDS = {
|
||||
'help': 'List available commands',
|
||||
'status': 'Edit the bot\'s status',
|
||||
'suicide': 'This will make you commit suicide',
|
||||
'debug': 'Debug command',
|
||||
'type': 'Kibby is yping...',
|
||||
'approve': 'Release users from probation',
|
||||
'unapprove': 'Send users to probation',
|
||||
'block': 'Troll a user',
|
||||
|
@ -479,6 +480,15 @@ client.on('message', async (message) => {
|
|||
break;
|
||||
}
|
||||
|
||||
case 'type': {
|
||||
if (message.channel?.typing_ids.has(client.user!._id)) {
|
||||
message.channel.stopTyping();
|
||||
} else {
|
||||
message.channel?.startTyping();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'help': {
|
||||
const commands = Object.entries(COMMANDS).filter(c => privileged || PUBLIC_COMMANDS.includes(c[0]));
|
||||
|
||||
|
|
Loading…
Reference in a new issue