Answer the question
In order to leave comments, you need to log in
Reaction under the post. How to fix?
I have a function responsible for informing the role about violations in the discord channels. I need to add an emotion to this message (which tags the desired role), by pressing which, the bot sends messages.
Now I have this code:
if (foundBadWords) {
client.channels.cache.get("792034371304685583").send({content: `<@&881924857351274517>, необходимо глянуть:`, embeds: [embedlogt]})
.then(message => {
message.react('❓')
.then(() => message.react('❓'))});
}
const filter = (reaction, user) => {
return reaction.emoji.name === '❓';
};
const collector = message.createReactionCollector(filter, {max: 2});
collector.on('collect', (reaction, user) => {
message.channel.send({embeds: [infoab]});
});
});
Answer the question
In order to leave comments, you need to log in
channel.send("сообщение").then(m => {
m.react("❓");
const filter = (reaction, user) => {
return reaction.emoji.name === '❓';
};
const collector = message.createReactionCollector(filter, {
max: 2
});
collector.on('collect', (reaction, user) => {
message.channel.send({
embeds: [infoab]
});
});
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question