24 lines
660 B
TypeScript
24 lines
660 B
TypeScript
import { Collection, SlashCommandBuilder, CommandInteraction, Client } from 'discord.js';
|
|
|
|
export interface Command {
|
|
data: Pick<SlashCommandBuilder, 'toJSON' | 'name'>,
|
|
execute: (interaction: CommandInteraction) => Promise<unknown>,
|
|
autocomplete?: (interaction: AutocompleteInteraction) => Promise<unknown>,
|
|
onClientReady?: (client: Client) => Promise<unknown>,
|
|
serverWhitelist?: string[],
|
|
}
|
|
|
|
export interface Config {
|
|
token: string,
|
|
sitePort: number,
|
|
siteURL: string,
|
|
clientId: string,
|
|
clientSecret: string,
|
|
}
|
|
|
|
declare module 'discord.js' {
|
|
export interface Client {
|
|
config: Config,
|
|
commands: Collection<string, Command>;
|
|
}
|
|
} |