20 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!and what doesnt work
and thats absolutely the most horrid way to fetch the member
.getMember returns a member
no need to fetch the user nor the member
i has d role but it gives me you not designer
i want if the member use /add_client has role role (d) give the member in options role m
but it give me return interaction.reply({ content: 'انت لست مصمم لا يمكنك استخدام هذا الأمر', ephemeral: true });
and i have d role
you're checking the member running the command if they have the role
not the member you want to add the role to
yes
interaction.member ?
is it false ?
what
its a GuildMember
not a boolean
no no you don't know what i want to do
i typesd /add_client if i have role d the bot give the role m to the user in options
do you understand pro ? @arcticwolvinny ❄ 🌈
no need to ping and you're not making much sense
check if the role exists at all
store your whole guild.roles.cache.find in a variable and log it
ok i will try
the same
it gives me انت لست مصمم لا يمكنك استخدام هذا الأمر
and have you logged the role
ya
and what did it return
.
and no erros in console
i highly doubt that log returned that
i dont see you logging it either
it told me you don't have the role
but i have it
console: log() static method
The console.log() static method outputs a message to the console. The message may be a single string (with optional substitution values), or it may be any one or more JavaScript objects.
log. it.
i think the way to chek if interaction.member has the role is wrong
that can be simplified
but unless you actually do what i ask you to do i cant help you
ok
i will try onther way