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

25 lines
666 B
TypeScript
Raw Permalink Normal View History

2023-11-16 11:33:11 +01:00
import { Collection, SlashCommandBuilder, CommandInteraction, Client } from 'discord.js';
2023-11-22 14:45:55 +01:00
import { Autocomplete } from '../lib/autocomplete';
2023-11-16 11:33:11 +01:00
export interface Command {
2023-11-17 18:30:27 +01:00
data: Pick<SlashCommandBuilder, 'toJSON' | 'name'>,
execute: (interaction: CommandInteraction) => Promise<unknown>,
2023-11-22 14:45:55 +01:00
autocomplete?: Autocomplete,
2023-11-17 18:30:27 +01:00
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
}
}