[英]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.