Chenged the command get format (removed the switch statement) and added the react command

This commit is contained in:
ION606
2022-05-13 22:03:05 +03:00
parent 19b51ecfb3
commit 21040344ae
21 changed files with 886 additions and 98 deletions
+21
View File
@@ -0,0 +1,21 @@
module.exports = {
name: 'r',
description: "Reacts with a phrase or single emoji",
async execute(message, args, Discord, Client, bot) {
// if (!message.reference) { return; }
let msg;
if (message.reference) {
msg = await message.channel.messages.fetch(message.reference.messageId);
} else { msg = message; }
for (let i = 0; i < args.length; i ++) {
try {
await msg.react(args[i]);
} catch(err) {
//The emoji wasn't a valid one
message.reply("Please enter a valid emoji");
}
}
}
}