Discord bot #8622
-
I'm creating a bot for discord in javascript. I made a command for when a user sends "-ping" the bot informs the user's ping in the chat, but the bot is not responding to the command. Can you help me?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You will need to send and enable the More on intents: https://discordjs.guide/popular-topics/intents.html |
Beta Was this translation helpful? Give feedback.
-
I recommand you to use slash commands instead |
Beta Was this translation helpful? Give feedback.
You will need to send and enable the
Guilds
,GuildMessages
andMessageContent
intents in order to receive the"messageCreate"
event.If you have that, check if the event even emits. Otherwise, put logs or debug breakpoints throughout your code to find out where execution stops and inspect the environment there (log or inspect relevant conditions and variables).
More on intents: https://discordjs.guide/popular-topics/intents.html