node-event-bot/server/types/commandTypes.ts

18 lines
599 B
TypeScript
Raw Normal View History

2022-03-09 12:29:42 +01:00
import { PermissionResolvable, ChatInputApplicationCommandData, CommandInteraction, CommandInteractionOptionResolver, GuildMember } from "discord.js";
import { ExtendedClient } from "../structures/client";
export interface ExtendedInteraction extends CommandInteraction {
member: GuildMember
}
2022-04-12 22:39:47 +02:00
export interface RunOptions {
2022-04-09 23:02:08 +02:00
client: ExtendedClient
2022-03-09 12:29:42 +01:00
interaction: ExtendedInteraction
args: CommandInteractionOptionResolver
}
type RunFunction = (options: RunOptions) => any
export type CommandType = {
userPermissions?: PermissionResolvable[]
run: RunFunction
} & ChatInputApplicationCommandData