I don't get a command

Hello, I'm testing a code so that when a person enters my roleplay discord by entering !register Name_Surname, the bot will verify it by entering the role that citizen and the name that he chose, but when I go to put that command to test, it doesn't work and it just tells me Let me start it and it worked for me to put a message in the verification channel, there I passed the code in case anyone could help me and what I should change:
10 Replies
d.js toolkit
d.js toolkit14mo ago
- 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! - Marked as resolved by staff
Lucho
LuchoOP14mo ago
Lucho
LuchoOP14mo ago
This is the code
treble/luna
treble/luna14mo ago
you miss the MessageContent intent
Melio
Melio14mo ago
Hey! If can give you some tips, For message.channel.name use message.channel.id instead, yes ! i was searching the intent's name x)
const channelid = 'urchannelid'
const basechannel= interaction.guild?.channels.cache.get(channelid)
const channelid = 'urchannelid'
const basechannel= interaction.guild?.channels.cache.get(channelid)
` this, is better !
Lucho
LuchoOP14mo ago
Thank you! but now I have another problem when I register it gives me the role I want but it does not change my name it gives me an error saying that it does not have permissions to change the nickname, but it has the necessary role until admin I put it to test and nothing
Lucho
LuchoOP14mo ago
treble/luna
treble/luna14mo ago
are you the guild owner
d.js docs
d.js docs14mo ago
- Bots cannot moderate (kick/ban/nickname/...) a target with a higher or equally high highest role or the guild owner. - Bots cannot modify (edit/add/remove) roles that are higher or equally high compared to the bot's highest role. - The Administrator permission does not skip these checks.
Lucho
LuchoOP14mo ago
Oh really? I thought that by having an administrator I could also try it even if I were the owner. Thank you!
Want results from more Discord servers?
Add your server