Ved
Ved
Explore posts from servers
SIASapphire - Imagine a framework
Created by Ved on 7/15/2023 in #sapphire-support
messageCreate not working with DMs
Greetings! I'm having troubles getting the messageCreate event to run with DMs. When I send a server message it all works well, but in DMs it simply refuses to work. listeners/messageCreate.ts:
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';
import { Events, Message } from 'discord.js';

@ApplyOptions<Listener.Options>({
event: Events.MessageCreate,
})
export class MessageCreateListener extends Listener {
public async run(message: Message) {
console.log('test');
// ...
}
}
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';
import { Events, Message } from 'discord.js';

@ApplyOptions<Listener.Options>({
event: Events.MessageCreate,
})
export class MessageCreateListener extends Listener {
public async run(message: Message) {
console.log('test');
// ...
}
}
Intents in client constructor:
intents: [
IntentBits.Guilds,
IntentBits.GuildMembers,
IntentBits.GuildMessages,
IntentBits.DirectMessages,
IntentBits.MessageContent,
],
intents: [
IntentBits.Guilds,
IntentBits.GuildMembers,
IntentBits.GuildMessages,
IntentBits.DirectMessages,
IntentBits.MessageContent,
],
I've also tripled checked whether the message intent is enabled in developer dashboard
6 replies