import { Message } from "discord.js"; export const handleReactCommand = async (message: Message) => { if (message.author.bot) return; if (!message.content.startsWith("uma!react")) return; if (!message.guild || message.author.id !== message.guild.ownerId) return; const parameters = message.content.split(" "); if (parameters.length < 3) { await message.reply("Usage: `uma!react `"); return; } const messageId = parameters[1]; const emoji = parameters[2]; try { const targetMessage = await message.channel.messages.fetch(messageId); if (!targetMessage) { await message.reply("Message not found."); return; } await targetMessage.react(emoji); } catch (error) { console.error("Error reacting to message:", error); await message.reply("Failed to react to the message."); } };