From 5eb1389a6f8121c5ad31d4c06b0c673998447ba0 Mon Sep 17 00:00:00 2001 From: Max Isom Date: Mon, 16 Mar 2020 12:13:18 -0500 Subject: [PATCH] Add say command --- src/bot.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bot.ts b/src/bot.ts index 2b9f07d..91fd71b 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -45,6 +45,13 @@ export default class { return this.client.emit('guildCreate', msg.guild); } + if (msg.content.startsWith('say') && msg.content.endsWith('muse')) { + const res = msg.content.slice(3, msg.content.indexOf('muse')).trim(); + + await msg.channel.send(res); + return; + } + const {prefix, channel} = settings; if (!msg.content.startsWith(prefix) || msg.author.bot || msg.channel.id !== channel) {