Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const owners = ["OWNER ID"];
- client.on("message", async message => {
- if (!message.guild || message.author.bot) return null;
- const [command, ...args] = message.content.trim().split(" ");
- if (command == `*add`) {
- if (!owners.includes(message.author.id)) return message.reply("Access denied.");
- if (!args[0] || !args[1]) return message.channel.send(`**Usage: ${command} <Message ID> <Emoji>**\nIf The message is not in this channel mention the channel: **${command} <Channel ID> <Message ID> <Emoji>**`);
- var channel, msgid, emoji;
- if (args[2]) {
- channel = client.channels.cache.get(args[0]);
- if (!channel) return message.reply("I can't find the channel.")
- msgid = args[1];
- emoji = args[2];
- } else {
- channel = message.channel;
- msgid = args[0];
- emoji = args[1];
- }
- try {
- const msg = await channel.messages.fetch(msgid);
- await msg.react(emoji);
- await message.reply("Done .")
- } catch (e) {
- if (e.message == 'Unknown Emoji') return message.channel.send(`The Emoji couldn't be found.`)
- message.channel.send(`I can't find the message.`);
- }
- }
- });
- //Add Emoji command By 3Mo_Steve
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement