parse context (works)?

This commit is contained in:
jacoobes
2022-02-04 15:09:26 -06:00
parent a83a0635a4
commit c78741f565
2 changed files with 13 additions and 8 deletions

View File

@@ -20,13 +20,18 @@ export enum CommandType {
SLASH = 4,
}
/// Thanks @cursorsdottsx
export type ParseType<T> = {
[K in keyof T] : T[K] extends unknown ? [k : K, args: T[K] ] : never;
}[keyof T];
export type Context = {
text : Option<Message>,
slash : Option<CommandInteraction>
}
export type ParseType = {
text : [arg: string];
slash : [SlashOptions]
export interface Arg {
text : string;
slash : SlashOptions
};
export type SlashOptions = Omit<CommandInteractionOptionResolver, "getMessage" | "getFocused">;