【问题标题】:Discord.js Embed reactions for another embedDiscord.js 另一个嵌入的嵌入反应
【发布时间】:2020-08-04 22:12:51
【问题描述】:

我正在尝试捕捉反应以使机器人发送另一个嵌入

if (args[0] == "Help" && args[1] == "Images" && args[2] == 'Animals' && !args[3]) {
    msg.author.send("Its gonna be messy here on out, so, I'll just send the future embeds here as to not cluttter up your server")

    let HIAembed = new Discord.MessageEmbed()
        .setTitle('Animal')
        .setAuthor("Mo'promo")
        .setColor(0x00EEEE)
        .setDescription("`Mamamal:`-Bear, lions and tigers,.....oh my.\n\n `Bird:`-Includes storks like the ones in the movie that carried babies.\n\n`Insects:`-Creepy ants.\n\n `Reptiles&amphibians:`-Awsome! Snakes and frogs, I don't know bout you, but there my dream come true.\n\n `SeaDwellers`-There once was a starfish named tommy")

    msg.channel.send({
        embed: HIAembed
    }).then(embedMessage => {

        embedMessage.react("????") && embedMessage.react("????") && embedMessage.react("????") && embedMessage.react("????") && embedMessage.react("????");
    })
}

如您所见,我已经完成了嵌入和我想要的反应,当用户点击表情符号时,我在输出另一个嵌入时遇到了一些问题。

【问题讨论】:

    标签: javascript node.js discord.js


    【解决方案1】:

    您将不得不使用.createReactionCollector() 来收集反应并在反应收集器收集特定表情符号时发送嵌入。

    您可以阅读this guide 以进一步了解反应收集器。

    【讨论】:

    • 当我点击一个表情符号时,它会向我发送所有可用的嵌入。我不知道我是否像这样保留所有嵌入:.catch(collected => { 但是所有都返回
    猜你喜欢
    • 2021-06-09
    • 2020-09-22
    • 2018-11-23
    • 2021-02-07
    • 2020-11-29
    • 2020-12-05
    • 2021-07-23
    • 2020-07-14
    • 2020-11-19
    相关资源
    最近更新 更多