divided types directory to multiple subfolders

This commit is contained in:
mmacierzanka committed 2021-09-08 18:55:15 +02:00
1 parent 7c128a9614
commit f705c6c896
22 files changed
+36 -36

No files matched your search

+6 -6
View File
@@ -2,14 +2,14 @@ import { Bot } from "./src/structures/Bot.js";
import { ChatCommand } from "./src/commands/ChatCommand.js";
import { MessageCommand } from "./src/commands/MessageCommand.js";
import { UserCommand } from "./src/commands/UserCommand.js";
import { InitOptions } from "./src/types/Bot.js";
import { ChatCommandInit } from "./src/types/ChatCommand.js";
import { HelpMessageParams } from "./src/types/HelpMessage.js";
import { ParameterResolvable, ParameterType, ParameterSchema } from "./src/types/Parameter.js";
import { SystemMessageAppearance, SystemMessageData } from "./src/types/SystemMessage.js";
import { InitOptions } from "./src/structures/types/Bot.js";
import { ChatCommandInit } from "./src/commands/types/ChatCommand.js";
import { HelpMessageParams } from "./src/commands/types/HelpMessage.js";
import { ParameterResolvable, ParameterType, ParameterSchema } from "./src/structures/types/Parameter.js";
import { SystemMessageAppearance, SystemMessageData } from "./src/structures/types/SystemMessage.js";
import { ObjectID, InputParameter, StringParameter, BooleanParameter, NumberParameter, ObjectParameter, Parameter } from "./src/structures/Parameter.js";
import { PermissionsError, ParameterTypeError, MissingParameterError, OperationSuccess } from "./src/errors.js";
import { CommandInteractionData } from "./src/types/commands.js";
import { CommandInteractionData } from "./src/commands/types/commands.js";
export default Bot;
export {
+3 -3
View File
@@ -1,9 +1,9 @@
import { Interaction, Message, Permissions, ReplyMessageOptions, MessageEmbed, GuildMember } from "discord.js";
import { PermissionCheckTypes } from "../types/permissions.js";
import { CommandType, BaseCommandInit, CommandFunction } from "../types/BaseCommand.js";
import { PermissionCheckTypes } from "./types/permissions.js";
import { CommandType, BaseCommandInit, CommandFunction } from "./types/BaseCommand.js";
import { InputParameter } from "../structures/Parameter.js";
import { OperationSuccess, PermissionsError } from "../errors.js";
import { BaseCommandObject } from "../types/api.js";
import { BaseCommandObject } from "../structures/types/api.js";
export class BaseCommand {
/**
+2 -2
View File
@@ -1,8 +1,8 @@
import { Message, Interaction } from "discord.js";
import { BaseCommand } from "./BaseCommand.js";
import { ChatCommandInit } from "../types/ChatCommand.js";
import { ChatCommandInit } from "./types/ChatCommand.js";
import { DefaultParameter, InputParameter, Parameter } from "../structures/Parameter.js";
import { TextCommandObject, TextCommandOptionChoiceObject, TextCommandOptionObject } from "../types/api.js";
import { TextCommandObject, TextCommandOptionChoiceObject, TextCommandOptionObject } from "../structures/types/api.js";
/**
* @class Class that represents a command instance
+1 -1
View File
@@ -1,7 +1,7 @@
import { MessageEmbed } from "discord.js";
import { ChatCommand } from "./ChatCommand.js";
import { ChatCommandManager } from "../managers/ChatCommandManager.js";
import { HelpMessageParams } from "../types/HelpMessage.js";
import { HelpMessageParams } from "./types/HelpMessage.js";
export class HelpMessage extends ChatCommand {
constructor(cmdManager: ChatCommandManager, params: HelpMessageParams, botName?: string) {
+1 -1
View File
@@ -1,4 +1,4 @@
import { MessageCommandInit } from "../types/MessageCommand.js";
import { MessageCommandInit } from "./types/MessageCommand.js";
import { BaseCommand } from "./BaseCommand.js";
export class MessageCommand extends BaseCommand {
+1 -1
View File
@@ -1,4 +1,4 @@
import { BaseCommandInit } from "../types/BaseCommand.js";
import { BaseCommandInit } from "./types/BaseCommand.js";
import { BaseCommand } from "./BaseCommand.js";
export class UserCommand extends BaseCommand {
@@ -1,8 +1,8 @@
import { MessageEmbed, ReplyMessageOptions, Message, CommandInteraction } from "discord.js";
import { InputParameter } from "../structures/Parameter.js";
import { ParameterResolvable } from "./Parameter.js";
import { InputParameter } from "../../structures/Parameter.js";
import { ParameterResolvable } from "../../structures/types/Parameter.js";
import { PermissionCheckTypes, PermissionTypes } from "./permissions.js";
import { BaseCommand } from "../commands/BaseCommand.js";
import { BaseCommand } from "../BaseCommand.js";
export interface BaseCommandInit {
name: string;
@@ -1,6 +1,6 @@
import { CommandInteraction, Message } from "discord.js";
import { ParameterSchema, ParameterResolvable } from "./Parameter.js";
import { InputParameter } from "../structures/Parameter.js";
import { ParameterSchema, ParameterResolvable } from "../../structures/types/Parameter.js";
import { InputParameter } from "../../structures/Parameter.js";
import { PermissionCheckTypes, PermissionTypes } from "./permissions.js";
import { CommandFunctionReturnTypes } from "./BaseCommand.js";
File renamed without changes.
File renamed without changes.
@@ -1,8 +1,8 @@
import { BaseCommand } from "../commands/BaseCommand.js";
import { ChatCommand } from "../commands/ChatCommand.js";
import { MessageCommand } from "../commands/MessageCommand.js";
import { UserCommand } from "../commands/UserCommand.js";
import { InputParameter } from "../structures/Parameter.js";
import { BaseCommand } from "../BaseCommand.js";
import { ChatCommand } from "../ChatCommand.js";
import { MessageCommand } from "../MessageCommand.js";
import { UserCommand } from "../UserCommand.js";
import { InputParameter } from "../../structures/Parameter.js";
export type CommandStructure<T> = T extends "MESSAGE" ? MessageCommand : T extends "USER" ? UserCommand : T extends "CHAT" ? ChatCommand : BaseCommand;
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
import { BaseCommand } from "./commands/BaseCommand.js";
import { GuildMember } from "discord.js";
import { Parameter } from "./structures/Parameter.js";
import { ParameterType } from "./types/Parameter.js";
import { ParameterType } from "./structures/types/Parameter.js";
/**
* @class Error indicating that a caller doesn't have enough permissions to execute a command
+2 -2
View File
@@ -1,10 +1,10 @@
import { CommandInteraction, Message } from "discord.js";
import { CommandNotFound, MissingParameterError } from "../errors.js";
import { BooleanParameter, InputParameter, NullParameter, NumberParameter, ObjectParameter, Parameter, StringParameter } from "../structures/Parameter.js";
import { CommandInteractionData } from "../types/commands.js";
import { CommandInteractionData } from "../commands/types/commands.js";
import { ChatCommand } from "../commands/ChatCommand.js";
import { CommandManager } from "./CommandManager.js";
import { ParameterResolvable } from "../types/Parameter.js";
import { ParameterResolvable } from "../structures/types/Parameter.js";
export class ChatCommandManager extends CommandManager {
protected readonly _list: ChatCommand[] = [];
+1 -1
View File
@@ -1,5 +1,5 @@
import { Interaction } from "discord.js";
import { CommandInteractionData } from "../types/commands.js";
import { CommandInteractionData } from "../commands/types/commands.js";
import { MessageCommand } from "../commands/MessageCommand.js";
import { CommandManager } from "./CommandManager.js";
import { CommandNotFound } from "../errors.js";
+3 -3
View File
@@ -6,9 +6,9 @@ import { ChatCommandManager } from "../managers/ChatCommandManager.js";
import { CommandNotFound, OperationSuccess, PermissionsError } from "../errors.js";
import { HelpMessage } from "../commands/Help.js";
import { SystemMessageManager } from "./SystemMessage.js";
import { CommandInteractionData } from "../types/commands.js";
import { InitOptions } from "../types/Bot.js";
import { HelpMessageParams } from "../types/HelpMessage.js";
import { CommandInteractionData } from "../commands/types/commands.js";
import { InitOptions } from "./types/Bot.js";
import { HelpMessageParams } from "../commands/types/HelpMessage.js";
import { applicationState } from "../state.js";
import { MessageCommandManager } from "../managers/MessageCommandManager.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import { CategoryChannel, Guild, GuildMember, Message, NewsChannel, Role, StageChannel, StoreChannel, TextChannel, VoiceChannel } from "discord.js";
import { ParameterType, ParameterResolvable, ParameterSchema } from "../types/Parameter.js";
import { ParameterType, ParameterResolvable, ParameterSchema } from "./types/Parameter.js";
/**
* @class Representation of command parameter
+1 -1
View File
@@ -1,5 +1,5 @@
import { Interaction, Message, MessageEmbed } from "discord.js";
import { SystemMessageAppearance, SystemMessageData, MessageType } from "../types/SystemMessage.js";
import { SystemMessageAppearance, SystemMessageData, MessageType } from "./types/SystemMessage.js";
export class SystemMessageManager {
/**
File renamed without changes.
@@ -1,4 +1,4 @@
import { ObjectID, TargetID } from "../structures/Parameter.js";
import { ObjectID, TargetID } from "../Parameter.js";
export type ParameterType = "string" | "boolean" | "number" | "user" | "role" | "channel" | "mentionable" | "target";
@@ -1,6 +1,6 @@
import { ColorResolvable, GuildMember, User } from "discord.js";
import { PermissionsError } from "../errors.js";
import { BaseCommand } from "../commands/BaseCommand.js";
import { PermissionsError } from "../../errors.js";
import { BaseCommand } from "../../commands/BaseCommand.js";
/**
* @type Type of message
File renamed without changes.