summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-19 17:45:11 -0700
committer8cy <[email protected]>2020-07-19 17:45:11 -0700
commit4a4d6a318d10a022ab9df4a14b8239f7993b4f4c (patch)
tree0a18fb0c121c8b23ce0b9b9a113f3a821711848a /src
parentUpdate package.json (diff)
downloadwater-waifu-re-master.tar.xz
water-waifu-re-master.zip
feat: add fix command, revert: revert heroku stuffHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/bot/commands/owner/say.ts32
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);
+ }
+}