big update of structure
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
6
server/types/clients.ts
Normal file
6
server/types/clients.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { ApplicationCommandDataResolvable } from "discord.js"
|
||||
|
||||
export interface RegisterCommandOptions {
|
||||
guildId?: string
|
||||
commands: ApplicationCommandDataResolvable[]
|
||||
}
|
17
server/types/commandTypes.ts
Normal file
17
server/types/commandTypes.ts
Normal 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
|
Reference in New Issue
Block a user