big update of structure
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
mightypanders
2022-03-09 12:29:42 +01:00
parent 2f1cdbbaf6
commit 9b2ddc35fa
13 changed files with 118 additions and 315 deletions

6
server/types/clients.ts Normal file
View File

@ -0,0 +1,6 @@
import { ApplicationCommandDataResolvable } from "discord.js"
export interface RegisterCommandOptions {
guildId?: string
commands: ApplicationCommandDataResolvable[]
}

View File

@ -0,0 +1,17 @@
import { PermissionResolvable, ChatInputApplicationCommandData, CommandInteraction, CommandInteractionOptionResolver, GuildMember } from "discord.js";
import { ExtendedClient } from "../structures/client";
export interface ExtendedInteraction extends CommandInteraction {
member: GuildMember
}
interface RunOptions {
clients: ExtendedClient
interaction: ExtendedInteraction
args: CommandInteractionOptionResolver
}
type RunFunction = (options: RunOptions) => any
export type CommandType = {
userPermissions?: PermissionResolvable[]
run: RunFunction
} & ChatInputApplicationCommandData