I've seen this question a lot, and I feel like I've tried most suggestions, but I can't get it to work. For now, I'm just logging the messageCreate event, but it just won't work. Help would be very much appreciated.
This is my code:
as you can see I've tried a couple things^^
const { GatewayIntentBits, Partials, Guilds, Events } = require('discord.js');
const Discord = require('discord.js');
const Client = new Discord.Client({
intents: [
/* GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.MessageContent, */
'Guilds', 'GuildMessages', 'DirectMessages', 'MessageContent'
],
partials: [
/* Partials.Channel,
Partials.GuildMember,
Partials.Message,
Partials.MessageReaction,
Partials.User,
Partials.GuildMessages,
Discord.PartialGroupDMChannel */
"CHANNEL", "GUILD_MEMBER", "MESSAGES", "MESSAGE_REACTION", "USER", "DMCHANNEL"
]
});
Client.on('messageCreate', async message => {
console.log('messageCreate event');
};
I've tried different ways of enabling the right intents and partials, but I'm about to lose my sanity.
You have to import Client from djs idk if the other thing will work but the way I do it is and change Client to client in messageCreate