moving types to types/handler.ts

This commit is contained in:
jacoobes
2022-02-04 00:39:05 -06:00
parent 16b284b08e
commit 55ea90bdc0
2 changed files with 17 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
import type { Ok, Result, Option } from 'ts-results';
import type { Awaitable, Client, CommandInteraction, Message, MessagePayload} from 'discord.js';
import type { Awaitable, Client, CommandInteraction, CommandInteractionOptionResolver, Message, MessagePayload} from 'discord.js';
import type { MessageOptions } from 'child_process';
import type { Sern } from '../../handler/sern/sern';
@@ -18,4 +18,13 @@ export type delegate = Sern.Module<unknown>["delegate"]
export enum CommandType {
TEXT = 2,
SLASH = 4,
}
}
export type Context = {
text : Option<Message>,
slash : Option<CommandInteraction>
}
export type ParseType = {
text : [arg: string];
slash : [options : Omit<CommandInteractionOptionResolver, "getMessage" | "getFocused">]
};