The bot has started, but does not respond to the standard command (!ping)
I installed all the required resources, node.js, discord.js library, latest versions.
The bot has enabled intents on the Discord Developers website.
The bot is turned on, it is online, but does not respond to the only ping command.
Code:
The token is valid.
Help me please
8 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!Your "message" event is invalid, should be messageCreate, did you ask AI to make it for you?
Oh, thank you! I was stupid.
However, the bot is still not responding.
@mallusrgreat I have already read this information
then did you take note of the first bullet point where it mentions what intents you'll need for the
messageCreate
event?If you need your bot to receive messages (MESSAGE_CREATE - "messageCreate" in discord.js), you need the Guilds and GuildMessages intent, plus the MessageContent privileged intent to receive the content, attachments, embeds and components fields of the message.
IntentsBitField.Flags.Guilds
?
I changed the code snippet this way, but the result hasn't changed: myIntents.add(IntentsBitField.Flags.Guilds, IntentsBitField.Flags.GuildPresences, IntentsBitField.Flags.GuildMembers, IntentsBitField.Flags.MessageContent);
If you need your bot to receive messages (MESSAGE_CREATE - "messageCreate" in discord.js), you need the Guilds and GuildMessages intent, plus the MessageContent privileged intent to receive the content, attachments, embeds and components fields of the message.
Thank you very much!!!
:dogeHaHa: