bot-framework/@types/Client.d.ts

69 lines
1.8 KiB
TypeScript
Raw Normal View History

2024-03-31 12:46:28 +02:00
import { LoggerClientOptions } from '@navy.gif/logger';
2024-03-31 13:42:54 +02:00
import { GatewayIntentBits, Partials } from 'discord.js';
2024-03-31 13:41:01 +02:00
import { ComponentType } from '../src/client/interfaces/Component.ts';
2024-03-31 19:15:51 +02:00
import Inhibitor from '../src/client/interfaces/Inhibitor.ts';
2024-03-31 12:46:28 +02:00
export type ClientOptions = {
2024-03-31 13:19:36 +02:00
// Set by the startup script
2024-03-31 12:46:28 +02:00
rootDir: string,
version: string,
2024-03-31 13:19:36 +02:00
// User configured
logger: LoggerClientOptions,
developmentMode: boolean,
2024-03-31 19:15:51 +02:00
developers: string[],
prefix: string,
2024-03-31 13:42:54 +02:00
libraryOptions: {
2024-03-31 19:15:51 +02:00
partials?: Partials[],
2024-03-31 13:42:54 +02:00
intents: GatewayIntentBits[],
invalidRequestWarningInterval?: number
}
2024-03-31 12:46:28 +02:00
}
export type ComponentOptions = {
type: ComponentType,
name: string,
disabled?: boolean
2024-03-31 13:42:54 +02:00
};
export type ExtendedCommandOptionDefinition = {
restricted?: boolean
} & CommandOptionDefinition
export type CommandDefinition = {
aliases?: string[],
options?: (ExtendedCommandOptionDefinition | ExtendedCommandOption)[],
restricted?: boolean,
dmOnly?: boolean,
guildOnly?: boolean,
help?: string,
limited?: Snowflake[],
showUsage?: boolean,
sameVc?: boolean,
description?: string,
2024-03-31 19:15:51 +02:00
} & Omit<ComponentOptions, 'type'>
export type ObserverOptions = {
priority?: number,
hooks?: Hooks,
} & Omit<ComponentOptions, 'type'>
export type InhibitorOptions = {
priority?: number,
silent?: boolean
} & Omit<ComponentOptions, 'type'>
export type InhibitorResponse<T extends boolean = boolean> = {
error: T,
inhibitor: Inhibitor,
reason: If<T, string>,
}
export type UserResolveable = Snowflake | User | GuildMember | string;
export type MemberResolveable = UserResolveable
export type RoleResolveable = Snowflake | Role | string;
export type ChannelResolveable = Snowflake | BaseChannel | string;
export type DiscordBaseStruct = {
id: string
}