mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +00:00
stop crying
This commit is contained in:
parent
4047279a7b
commit
3e06f9db97
@ -84,16 +84,11 @@ export function createAttachmentOption<T extends SeyfertAttachmentOption = Seyfe
|
|||||||
return { ...data, type: ApplicationCommandOptionType.Attachment } as const;
|
return { ...data, type: ApplicationCommandOptionType.Attachment } as const;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ParseMiddlewareType<T> = T extends MiddlewareContext<
|
export function createMiddleware<
|
||||||
any,
|
T = any,
|
||||||
CommandContext | MenuCommandContext<MessageCommandInteraction<boolean> | UserCommandInteraction<boolean>>
|
C extends CommandContext | MenuCommandContext<MessageCommandInteraction<boolean> | UserCommandInteraction<boolean>> =
|
||||||
>
|
| CommandContext
|
||||||
? T
|
| MenuCommandContext<MessageCommandInteraction<boolean> | UserCommandInteraction<boolean>>,
|
||||||
: MiddlewareContext<
|
>(data: MiddlewareContext<T, C>) {
|
||||||
T,
|
|
||||||
CommandContext | MenuCommandContext<MessageCommandInteraction<boolean> | UserCommandInteraction<boolean>>
|
|
||||||
>;
|
|
||||||
|
|
||||||
export function createMiddleware<T = ParseMiddlewareType<unknown>>(data: ParseMiddlewareType<T>) {
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user