Discord bot is online but doesn’t reply
What you see
The message event is deprecated. Use messageCreate instead
Why it happens
Two common causes. The code listens for "message", which v14 removed (it’s "messageCreate" now). Or the bot can’t read message text: Discord made Message Content a privileged intent in 2022, so message.content is empty unless the bot asks for it and you switch it on.
The fix
- rightsocket does this Changes "message" to "messageCreate" and adds the MessageContent intent when the code reads message text.
- You do this Turn on Message Content Intent under Bot in the Discord Developer Portal.
What changed, and when
- July 2022, discord.js: discord.js v14: Intents became GatewayIntentBits, MessageEmbed became EmbedBuilder, the "message" event became "messageCreate", and string styles and colours became enums.
- 2022, Discord: Message Content became a privileged intent: bots get empty message text unless they ask for it and it’s switched on in the Developer Portal.