bot.ts

1import {
2	AutocompleteInteraction,
3	ChatInputApplicationCommandData,
4	ChatInputCommandInteraction,
5	Client,
6	Collection,
7	Events,
8	SlashCommandBuilder,
9	SlashCommandSubcommandBuilder,
10} from 'discord.js'
11
12export type Bot<T extends Client> = T & {
13	commands: Collection<string, Command>
14}
15
16export type Command = {
17	data: SlashCommandBuilder | SlashCommandSubcommandBuilder
18	execute: (interaction: ChatInputCommandInteraction) => any | Promise<any>
19	autocomplete?: (interaction: AutocompleteInteraction) => any | Promise<any>
20}
21
22export type Event = {
23	name: Events
24	description?: string
25	once?: boolean
26	execute: (...args: any[]) => any | Promise<any>
27}
28