Answer the question
In order to leave comments, you need to log in
Discord.js menu not working. What to do?
I need the bot to send a message when entering the command and put a reaction on it
. As soon as the one who wrote the command puts the reaction, the bot reads it and sends another message
(if you can write a normal code, otherwise I have been having trouble with this lately)
I really need help and advice
The bot ignores and does not give errors
Answer the question
In order to leave comments, you need to log in
QQ!
I implemented it with this code and everything worked for me:
let embed = new Discord.MessageEmbed()
.setDescription(`Твой текст`);
message.channel.send(embed).then(msg => {
msg.react('✔').then( r => {
msg.react('❌')
const Yes = (reaction, user) => reaction.emoji.name === '✔' && user.id === message.author.id;
const No = (reaction, user) => reaction.emoji.name === '❌' && user.id === message.author.id;
const Yes1 = msg.createReactionCollector(Yes, {timer: 1000});
const No1 = msg.createReactionCollector(No, {timer: 1000});
Yes1.on('collect', r => {
msg.delete();
let embedYes = new Discord.MessageEmbed()
.setDescription(`Текст если на галочку`);
return message.channel.send(embedYes);
})
No1.on('collect', r => {
msg.delete();
let embedNo = new Discord.MessageEmbed()
.setDescription(`Текст если на крестик`);
return message.channel.send(embedNo);
})
})
})
Everything worked!! Thank you very much!!!! There is only one thing, but in my code, when using new Discord.MessageEmbed(), it gives an error. This is solved by deleting Discord and in the end everything looked like this for me let embed = new MessageEmbed()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question