Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

202
Visualizações
discord.js v12 verification system with reactions

I'm trying to make a verification system for my server, but I can't get it to work.
I want the users to react with an emoji to a message (embed) and then they get a role added.

    async execute(client, message, args) {
        const channel = '890657345145823252';
        const verifyrole = message.guild.roles.cache.find(role => role.id === '906506388598054922');

        const verifyemoji ='✅';

        let embed = new Discord.MessageEmbed()
        .setTitle(`**React here!**`)
        .setDescription('React here to get access to the Server!\n\n'
        + ` react with: ${verifyemoji} `);

        let MessageEmbed = await message.channel.send(embed);
        MessageEmbed.react(verifyemoji);

        client.on('messageReactionAdd', async(reaction, user) => {
            if(reaction.message.partial) await reaction.message.fetch();
            if(reaction.partial) await reaction.fetch();
            if(user.bot) return;

                if(reaction.message.channel.id == channel) {
                    if(reaction.emoji.name === verifyemoji) {
                        await reaction.message.guild.members.cache.get(user.id).roles.add(verifyrole);
                    }
                
                } else {
                    return;
                }
        })
    }
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda