mirror of
https://github.com/sern-handler/handler
synced 2026-06-17 13:22:17 +00:00
chore: prettier reformat
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
|
||||
import type {
|
||||
CommandInteractionOptionResolver,
|
||||
MessagePayload,
|
||||
MessageOptions,
|
||||
ClientEvents,
|
||||
Awaitable,
|
||||
ClientEvents,
|
||||
CommandInteractionOptionResolver,
|
||||
MessageOptions,
|
||||
MessagePayload,
|
||||
} from 'discord.js';
|
||||
|
||||
// Anything that can be sent in a `<TextChannel>#send` or `<CommandInteraction>#reply`
|
||||
@@ -15,15 +14,11 @@ export type ParseType<T> = {
|
||||
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
|
||||
}[keyof T];
|
||||
|
||||
|
||||
export type Args = ParseType<{ text: string[]; slash: SlashOptions }>;
|
||||
|
||||
export type DiscordEvent =
|
||||
ParseType< { [K in keyof ClientEvents ] : (...args : ClientEvents[K]) => Awaitable<void> }>;
|
||||
|
||||
export type DiscordEvent = ParseType<{ [K in keyof ClientEvents]: (...args: ClientEvents[K]) => Awaitable<void> }>;
|
||||
|
||||
export type SlashOptions = Omit<CommandInteractionOptionResolver, 'getMessage' | 'getFocused'>;
|
||||
|
||||
//https://dev.to/vborodulin/ts-how-to-override-properties-with-type-intersection-554l
|
||||
export type Override<T1, T2> = Omit<T1, keyof T2> & T2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user