src/types.d.ts (view raw)
1import { SlashCommandBuilder, Collection, AutocompleteInteraction, ChatInputCommandInteraction } from "discord.js"
2import { YouTubeStream } from "play-dl"
3
4export interface SlashCommand {
5 command: SlashCommandBuilder,
6 execute: (interaction : ChatInputCommandInteraction) => void,
7 autocomplete?: (interaction: AutocompleteInteraction) => void,
8 cooldown?: number // in seconds
9}
10
11export interface YTVideo {
12 name: string,
13 url: string,
14 stream?: YouTubeStream,
15}
16
17declare module "discord.js" {
18 export interface Client {
19 slashCommands: Collection<string, SlashCommand>
20 }
21}