messageCreate not triggering
node version: 17.0.1
intents:
event handling:
.src/events/messageCreate.js:
console:
$ node src/bot.js
command: messagehistory has been loaded
command: status has been loaded
event: interactionCreate has been loaded
event: messageCreate has been loaded
event: messageDelete has been loaded
event: ready has been loaded
...
Ready! Logged in as BOTNAME#XXXX
logfile:
[WS => Shard 0] Shard will not receive any more guild packets. Unavailable guild count: 1
[WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
So the only thing that I can see would be the Unavailable Guild count:1
but the bot still works with both commands,ready and interactionCreate events are triggered
3 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!
- ✅
Marked as resolved by OPYou intents array is empty. You want to just use a boring array instead of the adventerous
Object.keys
thing you got there.
Fixing that should give you the messages you desire.it did...thank you, dont even remember why I did it that way, prob some example I saw way back when and then just copied to newer bots and this was the first time it caused an issue.