messages not being read?
hello! i have the following code and when i use the command it does not run the code under it, so i added the line to log any messages captured by the bot and none are being found! the bot is online and running in the server https://gist.github.com/ash-development/70cdf741dd81efaf8c147f011790db50
8 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.
my node version is
v18.12.1
adding GatewayIntentBits.MessageContent
to the intents has not seemed to helpyou will need that intent to receive message content
but the event is named
messageCreate
in v14ah tysm!!
its registering the messages now but im running into some issues
it is sending the channel message saying its assigned the role
but its not logging it into the console
or actually giving the role
here's my code now, i improved a few thingshttps://gist.github.com/ash-development/57b02e48b42e647a3c90e4d27a0b1ff9
depending on how many members you attempt to add a role to, this could potentially get api spammy
but that aside, members aren't cached by default
you can fetch a guild's members with
<Guild>.members.fetch()
(this only needs to be done once)
you'll also need the GuildMembers
intentjust over 400 😭
but its in like
groups
not all at once
that still sounds a little spammy