messageCreate.js not working
Please note I am using a slash command, command and event handler.
Event handler +
client.events = new Collection
:
39 Replies
What is not working?
messageCreate won't fire for application commands
for normal commands
message.content will be empty if you don't have the Message content intent
Message content intent?
i used a console.log when a messageCreate happens and nothing shows up in the console
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
no?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
how do i use them
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tag suggestion for @PAdventures:
• Websocket intents limit events and decrease memory usage: learn more
• See what intents you need here
how do i add multiple intents
const client = new Client({ intents: [GatewayIntentBits.GuildMessages.MessageContent], partials: [Partials.Channel] });
not work
[Intent1, Intent2]
🤦♂️
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
k
how do i do that
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i have already done that and nothing happend
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
already enabled
messageCreate.js
you are missing the Guilds intent.
k
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
client isnt defined
or rather the content of client isnt
execute(message, client, commands)?
show how you pass client
in other words your event handler
you are not passing client to the method
either do that or just use message.client
k
thanks for the help guys
How do i get this to work?
TypeError: Cannot read properties of undefined (reading 'tag')
message.author is already a user
and message.author.commandName doesnt exist
message.commandName?
no
why do you think that exists
how do get the name of the command that the message author used then?
you parse it yourself
thats why you shouldnt use message commands
k
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
You are late, already resolved.