简体   繁体   English

当用户对消息做出反应时如何消除反应? - Discord.js

[英]How to remove the reaction when a user reacts to the message? - Discord.js

I am developing a bot, and in the command "help" I want that when the user reacts to an emoji, his reaction goes away and a new EMBED appears.我正在开发一个机器人,在命令“帮助”中,我希望当用户对表情符号做出反应时,他的反应消失并出现一个新的 EMBED。

informacaoL.on('collect', r => {

        const embedinformacao = new Discord.MessageEmbed()
            .setAuthor(`${message.guild.name} - Ajuda`)
            .setDescription(`⭐ **UTEIS**
            !ajuda - Exibe o menu de ajuda.
            !server - Mostra status do servidor.
            !user - Mostra o perfil do usuário.
            !bot - Mostra informações sobre mim.
            !sugerir \`<sugestão>\` - Crie uma sugestão para melhorar nosso servidor.
            !avatar - Mostra o avatar de um usuário ou do próprio usuário que usou o comando.
            !invites - Mostra o rank de convites.
            !lembrete \`<tempo>\` \`<lembrete>\` - Te lembra de algo importante.
            !notificar - Recebe a tag 🔔 NOTIFICAR (!notificar) e recebe novidades do servidor.
            !desnotificar - Remove a tag 🔔 NOTIFICAR (!notificar).
            !rank - Mostra o rank de XP.
            !topmoney - Mostra o rank de money.
            !ping - Mostra o delay bot-servidor.
            !toprep - Mostra o rank de recomendações.
            !codigo - Usado para enviar códigos snippets na sala 💾 snippets de códigos.
            !imgur \`<img>\` - Faz upload de uma imagem para o Imgur.
     `)
            .setColor("#00ff44")
            .setFooter(message.author.tag, message.author.avatarURL)
            .setTimestamp()
        msg.edit(embedinformacao)
    })

To remove the reaction, just do <Reaction>.remove() .要删除反应,只需执行<Reaction>.remove() If you have this in a reaction listener, you should have the reaction defined, and that should be the single reaction which would be removed.如果你在反应监听器中有这个,你应该定义反应,这应该是将被删除的单一反应。 Very simple yet very helpful非常简单但非常有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从特定消息中删除特定用户反应 - Discord.js - Remove a specific user reaction from a specific message - Discord.js 如何删除 Discord.js 中特定用户对消息的反应? - How do I remove a reaction from a message by a specific user in Discord.js? 如果没有用户对第一反应做出反应,则 Discord.js 反应收集器将失败。 无法读取未定义的属性“计数” - Discord.js Reaction collector failing if no user reacts with first reaction. Cannot read property 'count' of undefined 当用户对消息做出反应时,bot 在 discord.js 中发送另一条消息 - When user reacts to message, bot sends another message in discord.js 如何检查原始消息发送者是否有反应 discord.js - How to check if the original message sender reacts discord.js 删除任何消息上的特定反应表情 (Discord.js) - Remove a specific reaction emote on any message (Discord.js) Discord.js 反应角色用户不确定消息 - Discord.js reaction roles user uncertainty message 当有人对表情符号(discord.js)做出反应时,如何编辑消息? - How do I make a message get edited when someone reacts with an emoji (discord.js)? 点击这个反应表情符号DIscord.js时是否可以删除消息 - is there can delete message when click this reaction emoji DIscord.js 如何等待反应然后才发送消息 [discord.js] - How to wait for reaction and only then send message [discord.js]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM