diff options
Diffstat (limited to 'packages/gateway/src/commands/react.ts')
| -rw-r--r-- | packages/gateway/src/commands/react.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/gateway/src/commands/react.ts b/packages/gateway/src/commands/react.ts index d8a8021..84dce37 100644 --- a/packages/gateway/src/commands/react.ts +++ b/packages/gateway/src/commands/react.ts @@ -1,4 +1,5 @@ import { Message } from "discord.js"; +import { replyWithCleanup } from "../utilities"; export const handleReactCommand = async (message: Message) => { if (message.author.bot) return; @@ -10,7 +11,10 @@ export const handleReactCommand = async (message: Message) => { const parameters = message.content.split(" "); if (parameters.length < 3) { - await message.reply("Usage: `uma!react <message_id> <emoji>`"); + await replyWithCleanup( + message, + "❌ Usage: `uma!react <message_id> <emoji>`", + ); return; } @@ -22,7 +26,7 @@ export const handleReactCommand = async (message: Message) => { const targetMessage = await message.channel.messages.fetch(messageId); if (!targetMessage) { - await message.reply("Message not found."); + await replyWithCleanup(message, "❌ Message not found."); return; } @@ -30,7 +34,6 @@ export const handleReactCommand = async (message: Message) => { await targetMessage.react(emoji); } catch (error) { console.error("Error reacting to message:", error); - - await message.reply("Failed to react to the message."); + await replyWithCleanup(message, "❌ Failed to react to the message."); } }; |