src/types.d.ts (view raw)
1import { SlashCommandBuilder, Collection, AutocompleteInteraction, ChatInputCommandInteraction } from "discord.js"
2
3export interface SlashCommand {
4 command: SlashCommandBuilder,
5 execute: (interaction : ChatInputCommandInteraction) => void,
6 autocomplete?: (interaction: AutocompleteInteraction) => void,
7 cooldown?: number // in seconds
8}
9
10declare module "discord.js" {
11 export interface Client {
12 slashCommands: Collection<string, SlashCommand>
13 }
14}