Reputation: 1
I have invited the bot to my server and it does see all messages typed over there. However, when I send it a DM, it does not react at all, even the event 'messageCreate' is not invoked.
const client = new Client({intents: [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
]});
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('messageCreate', (message) => {
console.log('Message received:', message.content); // prints all messages inside my server
});
Maybe direct messages are handled by different event now? Can't find the newest information.
Upvotes: 0
Views: 51
Reputation: 1
const client = new Client({
intents: [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
'partials': [Partials.Channel]
});
Upvotes: 0