diff --git a/index.js b/index.js index 633677e..680083f 100644 --- a/index.js +++ b/index.js @@ -80,9 +80,10 @@ Client.on("interactionCreate", async interaction => { } else if (commandName === 'role') { console.log(interaction) - interaction.user.c + let roleId = interaction.options._hoistedOptions[0].value + await interaction.member.roles.add(interaction.guild.roles.cache.find(r => r.id === roleId)) await interaction.reply({ - content: `Ajout du role : <@&${interaction.options._hoistedOptions[0].value}>`, + content: `Ajout du role : <@&${roleId}>`, fetchReply: true, ephemeral: true })