diff options
Diffstat (limited to 'packages/gateway/src/commands/say.ts')
| -rw-r--r-- | packages/gateway/src/commands/say.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/gateway/src/commands/say.ts b/packages/gateway/src/commands/say.ts index 831fe8c..76a6ec3 100644 --- a/packages/gateway/src/commands/say.ts +++ b/packages/gateway/src/commands/say.ts @@ -1,5 +1,4 @@ import { Message } from "discord.js"; -import { CENTRAL_GUILD_ID } from "../constants"; import { replyWithCleanup } from "../utilities"; export const handleSayCommand = async (message: Message) => { @@ -28,7 +27,7 @@ export const handleSayCommand = async (message: Message) => { let targetChannel: any; let targetMessage: any = null; const channelIdMatch = firstParameter.match(/^\d{17,19}$/); - + if (!channelIdMatch) { await replyWithCleanup( message, @@ -50,12 +49,15 @@ export const handleSayCommand = async (message: Message) => { } const messageIdMatch = secondParameter?.match(/^\d{17,19}$/); - + if (messageIdMatch) { try { targetMessage = await targetChannel.messages.fetch(secondParameter); } catch { - await replyWithCleanup(message, "❌ Message not found in the specified channel."); + await replyWithCleanup( + message, + "❌ Message not found in the specified channel.", + ); return; } |