This commit is contained in:
Bxio 2025-04-27 13:49:41 +01:00
parent 29e4d4cd32
commit 53f9be3042

View File

@ -59,14 +59,11 @@ module.exports = {
return await interaction.editReply({ content: `❗ O membro ${nome.username} já está registrado no banco de dados.`, ephemeral: true });
}
// 2 - Inserir no banco
await conn.execute(
`INSERT INTO users (discord_id, discord_avatar, discord_username, cargo, level) VALUES (?, ?, ?, ?, ?)`,
[nome.id, idavatar,nome.username, cargo, "0"]
);
// 2 - Inserir no banco
await conn.execute(
`INSERT INTO users (discord_id, discord_avatar, discord_username, cargo, level) VALUES (?, ?, ?, ?, ?)`,
[nome.id, idavatar,nome.username, cargo, "0"]
);
} catch (error) {
console.error(error);
@ -74,8 +71,7 @@ module.exports = {
}
try {
// 3 - Pegar o membro na guilda
// 3 - Pegar o membro na guilda
const member = await interaction.guild.members.fetch(nome.id);
// 4 - Verificar se o membro já tem o cargo