diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bot/commands/owner/say.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/bot/commands/owner/say.ts b/src/bot/commands/owner/say.ts new file mode 100644 index 0000000..31eb78c --- /dev/null +++ b/src/bot/commands/owner/say.ts @@ -0,0 +1,32 @@ +import { Command } from 'discord-akairo'; +import { Message } from 'discord.js'; + +export default class SayCommand extends Command { + public constructor() { + super('say', { + aliases: ['say'], + clientPermissions: ['SEND_MESSAGES', 'MANAGE_MESSAGES'], + description: { + content: "Speak as the bot.", + }, + category: 'owner', + ownerOnly: true, + args: [ + { + id: 'message', + match: 'text', + } + ] + }); + } + + public async exec(msg: Message, { message }: { message: any }): Promise<Message | Message[]> { + msg.delete(); + + let owners = process.env.OWNERS!.split(','); + if (!owners.includes(msg.author.id)) return msg.author.send('You are missing permissions to use this command!'); + if (!message) return msg.author.send('You did not specify what you want me to say!'); + + return msg.util!.send(message); + } +} |