Midnight
Midnight
DIAdiscord.js - Imagine an app
Created by Midnight on 4/23/2024 in #djs-questions
messageCreate Event is not receiving DM messages
The code is simple
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessageTyping
]
});

client.on('messageCreate', async (message) => {
if (message.channel.type === ChannelType.DM) {
if (message.author.bot || message.author.system) return;
console.log(message.author.id, message.content);
}
});
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.DirectMessageTyping
]
});

client.on('messageCreate', async (message) => {
if (message.channel.type === ChannelType.DM) {
if (message.author.bot || message.author.system) return;
console.log(message.author.id, message.content);
}
});
5 replies
DIAdiscord.js - Imagine an app
Created by Midnight on 4/23/2024 in #djs-questions
messageCreate Event is not receiving DM messages
- [email protected] Node: v18.19.1
5 replies