Update handler.ts

This commit is contained in:
xxDeveloper
2022-02-12 08:52:29 +03:00
committed by GitHub
parent ba8a77a247
commit d2e4ca63a7

View File

@@ -3,12 +3,13 @@ import type { CommandInteraction, CommandInteractionOptionResolver, Message, Mes
import type * as Sern from "../handler/sern"
export type Visibility = "private" | "public"
//Anything that can be sent in a `<TextChannel>#send` or `<CommandInteraction>#reply`
// Anything that can be sent in a `<TextChannel>#send` or `<CommandInteraction>#reply`
export type possibleOutput<T = string> = T | MessagePayload & MessageOptions;
export type Nullable<T> = T | null;
export type delegate = Sern.Module<unknown>["delegate"]
/// Thanks @cursorsdottsx
// Thanks @cursorsdottsx
export type ParseType<T> = {
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
}[keyof T];
@@ -19,5 +20,6 @@ export type Context = {
interaction: Option<CommandInteraction>
}
export type Arg = ParseType<{text : string, slash : SlashOptions}>
// TypeAlias for interaction.options
export type SlashOptions = Omit<CommandInteractionOptionResolver, "getMessage" | "getFocused">;
export type SlashOptions = Omit<CommandInteractionOptionResolver, "getMessage" | "getFocused">;