-
So basically I am trying to use the self bot to, farm stuff in other bots so I dont have to stay up late and could do something productive in the meantime. I did come up with a code, however it dosnt seem to work.. I want to first sent a message ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Use message.react() to react that Emoji. To receive Message, use messageCreate State. |
Beta Was this translation helpful? Give feedback.
-
Here is example code. const sleep = (ms) => new Promise(res => setTimeout(res, ms));
client.on('messageCreate', async message => {
if (!message.guild) return;
if (message.author.id == "THAT_BOT_ID") {
if (message.embeds[0].?description.toLowerCase().includes("please react with")) {
await sleep(2000); // Make sure the bot has react Emoji to its Message.
await message.react("RAW_EMOJI");
}
}
}); |
Beta Was this translation helpful? Give feedback.
Here is example code.