#No that’s your parameter you need to
1 messages · Page 1 of 1 (latest)
no
read it again
- the event is called messageCreate
- you are missing the GuildMessages and MessageContent intent
sorry I am very new to coding but I will look into it
Very new to reading too
I made the changes
const { Client, Intents } = require('discord.js');
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES]
});
client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});
client.on('messageCreate', message => {
if (message.content.toLowerCase() === 'hello') {
message.channel.send('Hello World!');
}
});
but I am getting the error: Cannot read properties of undefined (reading 'FLAGS')
Any suggestions?
interesting that you switched from working code to non working code