mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
finished formatting
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { Option } from 'ts-results';
|
||||
|
||||
import type {
|
||||
CommandInteraction,
|
||||
CommandInteractionOptionResolver,
|
||||
Message,
|
||||
MessagePayload,
|
||||
MessageOptions,
|
||||
CommandInteraction,
|
||||
CommandInteractionOptionResolver,
|
||||
Message,
|
||||
MessagePayload,
|
||||
MessageOptions,
|
||||
} from 'discord.js';
|
||||
|
||||
import type * as Sern from '../handler/sern';
|
||||
@@ -18,14 +18,14 @@ export type delegate = Sern.Module<unknown>['delegate'];
|
||||
|
||||
// Thanks @cursorsdottsx
|
||||
export type ParseType<T> = {
|
||||
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
|
||||
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
|
||||
}[keyof T];
|
||||
|
||||
// A Sern.Module['delegate'] will carry a Context Parameter
|
||||
|
||||
export type Context = {
|
||||
message: Option<Message>;
|
||||
interaction: Option<CommandInteraction>;
|
||||
message: Option<Message>;
|
||||
interaction: Option<CommandInteraction>;
|
||||
};
|
||||
|
||||
export type Arg = ParseType<{ text: string; slash: SlashOptions }>;
|
||||
|
||||
Reference in New Issue
Block a user