From cf429b3e4f92031f9a2637bab584171813fefe09 Mon Sep 17 00:00:00 2001 From: e201098 Date: Thu, 31 Mar 2022 16:55:17 +0200 Subject: [PATCH] config --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 })