Handling error?
I guess its an error in my command handler. as No commands will register
26 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.v14/11
v20
No error
initiates commands fine
But as when you try to use them, it does nothing
Here would be a command example
Where are you registering the commands?
Inside a folder called commands.
Do you have a deployment script or something?
Its finds the path just fine
No, its ran locally
Not dockerized or anything
You're not registering the commands anywhere though, only finding the files in the commands folder and putting them in the client.commands collection
does .set not register them?
Im not using slash.
Message commands
hence the messageCreate
not interaction
Oh, I see
i see no issue with the code
but it wont work?
What do you mean by register though, you don't need to register commands when using message commands
By the way, MessageEmbed was renamed to EmbedBuilder in v14
As in defining them
Also, what intents do you have, can you show your client constructor?
Should not matter, it is not reading any message I send
All, 32057 bitfield
I think that should be all anyway
We highly recommend only specifying the intents you actually need.
- Note, that
98303
, 32767
or whatever other magic number you read that represents "all intents", gets outdated as soon as new intents are introduced.
- The number will always represent the same set of intents, and will not include new ones. There is no magic "all intents" bit.That's not all
I swear if that was the reason i was erroring
Please only have the intents you need, use GatewayIntentBits enum
If you aren't getting content, embeds or attachments of a message, make sure you have the
MessageContent
intent enabled in the Developer Portal and provide it to your client:
I know but you might wanna fix that as well
yeah
I will
it was an intent error
thank you so much
Of course