monorepo/apps/bot/.sapphire/templates/preconditions/precondition.ts
2024-12-09 12:01:58 +00:00

22 lines
620 B
TypeScript

import { Precondition } from '@sapphire/framework';
import type { ChatInputCommandInteraction, ContextMenuCommandInteraction, Message } from 'discord.js';
export class UserPrecondition extends Precondition {
public override messageRun(message: Message) {
return this.ok();
}
public override chatInputRun(interaction: ChatInputCommandInteraction) {
return this.ok();
}
public override contextMenuRun(interaction: ContextMenuCommandInteraction) {
return this.ok();
}
}
declare module '@sapphire/framework' {
interface Preconditions {
/*{{name}}*/: never;
}
}