jillo-bot/src/types/index.d.ts

24 lines
660 B
TypeScript
Raw Normal View History

2023-11-16 11:33:11 +01:00
import { Collection, SlashCommandBuilder, CommandInteraction, Client } from 'discord.js';
export interface Command {
2023-11-17 18:30:27 +01:00
data: Pick<SlashCommandBuilder, 'toJSON' | 'name'>,
execute: (interaction: CommandInteraction) => Promise<unknown>,
autocomplete?: (interaction: AutocompleteInteraction) => Promise<unknown>,
onClientReady?: (client: Client) => Promise<unknown>,
2023-11-16 11:33:11 +01:00
serverWhitelist?: string[],
}
2022-06-08 02:57:15 +02:00
2023-11-17 19:23:35 +01:00
export interface Config {
token: string,
sitePort: number,
2023-11-19 21:28:31 +01:00
siteURL: string,
clientId: string,
clientSecret: string,
2023-11-17 19:23:35 +01:00
}
2022-06-08 02:57:15 +02:00
declare module 'discord.js' {
export interface Client {
2023-11-17 19:23:35 +01:00
config: Config,
2023-11-16 11:33:11 +01:00
commands: Collection<string, Command>;
2022-06-08 02:57:15 +02:00
}
}