Ved
Ved
Explore posts from servers
SIASapphire - Imagine a framework
Created by Ved on 1/21/2025 in #sapphire-support
Dupliacte commands
When registering commands with Sapphire, it created duplicate ones on top of the old ones from legacy codebase. How can I delete duplicate ones so only the currently active (Sapphire generated ones) remain? Deleting all commands and re-registering them is also an option I can do, just not sure how
35 replies
PPrisma
Created by Ved on 10/21/2024 in #help-and-questions
Cache invalidation across different repositories
Is it possible to invalidate cache across different codebases that use the same Accelerate connect URI? Let's say that multiple microservices can manage articles collection in Mongo and they use TTL cache with articles tag. Does invalidate() call for that tag in one codebase also invalidate the cache in all codebases?
5 replies
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