18 lines
599 B
TypeScript
18 lines
599 B
TypeScript
import { PermissionResolvable, ChatInputApplicationCommandData, CommandInteraction, CommandInteractionOptionResolver, GuildMember } from "discord.js";
|
|
import { ExtendedClient } from "../structures/client";
|
|
|
|
export interface ExtendedInteraction extends CommandInteraction {
|
|
member: GuildMember
|
|
}
|
|
export interface RunOptions {
|
|
client: ExtendedClient
|
|
interaction: ExtendedInteraction
|
|
args: CommandInteractionOptionResolver
|
|
}
|
|
|
|
type RunFunction = (options: RunOptions) => any
|
|
export type CommandType = {
|
|
userPermissions?: PermissionResolvable[]
|
|
run: RunFunction
|
|
} & ChatInputApplicationCommandData
|