最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Discord.js message after receiving emoji reaction - Stack Overflow

programmeradmin7浏览0评论

It it possible to make a Discord bot send a message once a previous message has received a reaction? I was thinking about something like:

if(cmd === `${prefix}list`) {
    var i = 0;

    let embed = new Discord.RichEmbed()
      .addField("List", "Content");

    let anotherembed = new Discord.RichEmbed()
      .addField("Message", "List has been pleted!");

    return message.channel.send(embed);

    do {
      message.channel.send(anotherembed + 1);
    }
    while (i !== 0) && (reaction.emoji.name === "✅");

}

It it possible to make a Discord bot send a message once a previous message has received a reaction? I was thinking about something like:

if(cmd === `${prefix}list`) {
    var i = 0;

    let embed = new Discord.RichEmbed()
      .addField("List", "Content");

    let anotherembed = new Discord.RichEmbed()
      .addField("Message", "List has been pleted!");

    return message.channel.send(embed);

    do {
      message.channel.send(anotherembed + 1);
    }
    while (i !== 0) && (reaction.emoji.name === "✅");

}
Share Improve this question edited Apr 15, 2018 at 16:54 André 4,4974 gold badges32 silver badges58 bronze badges asked Apr 15, 2018 at 13:51 NedNed 411 gold badge1 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 12

That's not something you should do.
What you want is message.awaitReactions.
There is a great guide by the DiscordJS team and munity that has a great example for awaitReactions.
Here is the link and an example they used:

message.react('
发布评论

评论列表(0)

  1. 暂无评论