mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
29 lines
772 B
TypeScript
29 lines
772 B
TypeScript
import {
|
|
ApplicationCommandOptionChoiceData,
|
|
AutocompleteFocusedOption,
|
|
AutocompleteInteraction,
|
|
CommandInteraction,
|
|
PermissionsString,
|
|
} from 'discord.js';
|
|
import { RateLimiter } from 'discord.js-rate-limiter';
|
|
|
|
import { EventData } from '../models/internal-models.js';
|
|
|
|
export interface Command {
|
|
names: string[];
|
|
cooldown?: RateLimiter;
|
|
deferType: CommandDeferType;
|
|
requireClientPerms: PermissionsString[];
|
|
autocomplete?(
|
|
intr: AutocompleteInteraction,
|
|
option: AutocompleteFocusedOption
|
|
): Promise<ApplicationCommandOptionChoiceData[]>;
|
|
execute(intr: CommandInteraction, data: EventData): Promise<void>;
|
|
}
|
|
|
|
export enum CommandDeferType {
|
|
PUBLIC = 'PUBLIC',
|
|
HIDDEN = 'HIDDEN',
|
|
NONE = 'NONE',
|
|
}
|