MessageCreate event not firing
Have intents set up any reason why this might not be working?
21 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 staffclient.on(Events.messageCreate, message => {
console.log("Hi");
});
const client = new Client({ intents: [GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.Guilds]})
You need to enable it in the portal, in your code and register properly to the event.
They are enabled in portal
what about your client? which intent you passed?
const client = new Client({ intents: [GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.Guilds]})
what about your client.on for the message create?
.
does any other event work other than messageCreate?
like ready
yes
onready works
and
server join
I'm using a new account for my bot though maybe that's why?
It has to be in a server at least
it is in a server
sry for the dummy question 😅 i'm trying to cover everything
np lol
are you sure the bot can view the channel you are sending messages in and can view the message history
otherwise there isn't really much to go on here
yes
has admin perms
only thing I can think of is discord ristricts new accounts from being able to view message content
Event is MessageCreate not messageCreate
you can look in Event from the module 😄
oh gg
LOL
I took your code in my vscode and I spot it right away ^^
i didnt get an error
thats prob why i didnt spot it
thx