moved general command-related types

This commit is contained in:
mmacierzanka committed 2021-09-08 22:53:08 +02:00
1 parent 4b854950d1
commit 608b0141d0
1 file changed
+9 -2
+9 -2
View File
@@ -1,10 +1,17 @@
import { BaseCommand } from "../BaseCommand.js"; import { BaseCommand } from "../BaseCommand.js";
import { ChatCommand } from "../ChatCommand.js"; import { ChatCommand } from "../ChatCommand.js";
import { MessageCommand } from "../ContextMenuCommand.js"; import { ContextMenuCommand } from "../ContextMenuCommand.js";
import { ParameterResolvable } from "structures/types/Parameter.js"; import { ParameterResolvable } from "structures/types/Parameter.js";
import { TargetID } from "structures/parameter.js"; import { TargetID } from "structures/parameter.js";
import { CommandInteraction, Message, MessageEmbed, ReplyMessageOptions } from "discord.js";
export type CommandResolvable = BaseCommand | ChatCommand | MessageCommand; export type CommandResolvable = BaseCommand | ChatCommand | ContextMenuCommand;
export type CommandType = "CHAT" | "MESSAGE" | "USER";
export type CommandFunctionReturnTypes = void | string | MessageEmbed | ReplyMessageOptions | Promise<void | string | MessageEmbed | ReplyMessageOptions>;
export type CommandFunction = (args: ReadonlyMap<string, ParameterResolvable> | TargetID, interaction?: Message | CommandInteraction) => CommandFunctionReturnTypes;
export interface CommandInteractionData { export interface CommandInteractionData {
command: BaseCommand; command: BaseCommand;