diff --git a/index.ts b/index.ts index cd28902..e89b0ba 100644 --- a/index.ts +++ b/index.ts @@ -1,7 +1,7 @@ import { Bot } from "./src/structures/Bot.js"; -import { ChatCommand } from "./src/structures/ChatCommand.js"; -import { MessageCommand } from "./src/structures/MessageCommand.js"; -import { UserCommand } from "./src/structures/UserCommand.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"; diff --git a/src/structures/BaseCommand.ts b/src/commands/BaseCommand.ts similarity index 99% rename from src/structures/BaseCommand.ts rename to src/commands/BaseCommand.ts index 3d46f36..44fc7f4 100644 --- a/src/structures/BaseCommand.ts +++ b/src/commands/BaseCommand.ts @@ -1,7 +1,7 @@ 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 { InputParameter } from "./Parameter.js"; +import { InputParameter } from "../structures/Parameter.js"; import { OperationSuccess, PermissionsError } from "../errors.js"; import { BaseCommandObject } from "../types/api.js"; diff --git a/src/structures/ChatCommand.ts b/src/commands/ChatCommand.ts similarity index 98% rename from src/structures/ChatCommand.ts rename to src/commands/ChatCommand.ts index 7186711..31457e3 100644 --- a/src/structures/ChatCommand.ts +++ b/src/commands/ChatCommand.ts @@ -1,7 +1,7 @@ import { Message, Interaction } from "discord.js"; import { BaseCommand } from "./BaseCommand.js"; import { ChatCommandInit } from "../types/ChatCommand.js"; -import { DefaultParameter, InputParameter, Parameter } from "./Parameter.js"; +import { DefaultParameter, InputParameter, Parameter } from "../structures/Parameter.js"; import { TextCommandObject, TextCommandOptionChoiceObject, TextCommandOptionObject } from "../types/api.js"; /** diff --git a/src/structures/Help.ts b/src/commands/Help.ts similarity index 100% rename from src/structures/Help.ts rename to src/commands/Help.ts diff --git a/src/structures/MessageCommand.ts b/src/commands/MessageCommand.ts similarity index 100% rename from src/structures/MessageCommand.ts rename to src/commands/MessageCommand.ts diff --git a/src/structures/UserCommand.ts b/src/commands/UserCommand.ts similarity index 100% rename from src/structures/UserCommand.ts rename to src/commands/UserCommand.ts diff --git a/src/errors.ts b/src/errors.ts index 700038d..e34eee0 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,4 +1,4 @@ -import { BaseCommand } from "./structures/BaseCommand.js"; +import { BaseCommand } from "./commands/BaseCommand.js"; import { GuildMember } from "discord.js"; import { Parameter } from "./structures/Parameter.js"; import { ParameterType } from "./types/Parameter.js"; diff --git a/src/managers/ChatCommandManager.ts b/src/managers/ChatCommandManager.ts index c8c43c5..7fe6132 100644 --- a/src/managers/ChatCommandManager.ts +++ b/src/managers/ChatCommandManager.ts @@ -2,7 +2,7 @@ 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 { ChatCommand } from "../structures/ChatCommand.js"; +import { ChatCommand } from "../commands/ChatCommand.js"; import { CommandManager } from "./CommandManager.js"; import { ParameterResolvable } from "../types/Parameter.js"; diff --git a/src/managers/CommandManager.ts b/src/managers/CommandManager.ts index ffeff70..f0d6cf3 100644 --- a/src/managers/CommandManager.ts +++ b/src/managers/CommandManager.ts @@ -1,5 +1,5 @@ import { applicationState } from "../state.js"; -import { BaseCommand } from "../structures/BaseCommand.js"; +import { BaseCommand } from "../commands/BaseCommand.js"; export class CommandManager { protected readonly _list: BaseCommand[] = []; diff --git a/src/managers/MessageCommandManager.ts b/src/managers/MessageCommandManager.ts index cfee6ab..c45b226 100644 --- a/src/managers/MessageCommandManager.ts +++ b/src/managers/MessageCommandManager.ts @@ -1,6 +1,6 @@ import { Interaction } from "discord.js"; import { CommandInteractionData } from "../types/commands.js"; -import { MessageCommand } from "../structures/MessageCommand.js"; +import { MessageCommand } from "../commands/MessageCommand.js"; import { CommandManager } from "./CommandManager.js"; import { CommandNotFound } from "../errors.js"; import { Parameter, TargetID, TargetParameter } from "../structures/Parameter.js"; diff --git a/src/state.ts b/src/state.ts index ef2da3f..98ab44c 100644 --- a/src/state.ts +++ b/src/state.ts @@ -1,3 +1,3 @@ -import { StateManager } from "./managers/StateManager.js"; +import { StateManager } from "./structures/StateManager.js"; export const applicationState = new StateManager(); diff --git a/src/structures/Bot.ts b/src/structures/Bot.ts index b4832e1..62d1173 100644 --- a/src/structures/Bot.ts +++ b/src/structures/Bot.ts @@ -1,11 +1,11 @@ import { Client, CommandInteraction, GuildMember, Intents, Message } from "discord.js"; import { EventEmitter } from "events"; import * as http from "http"; -import { ChatCommand } from "./ChatCommand.js"; +import { ChatCommand } from "../commands/ChatCommand.js"; import { ChatCommandManager } from "../managers/ChatCommandManager.js"; import { CommandNotFound, OperationSuccess, PermissionsError } from "../errors.js"; -import { HelpMessage } from "./Help.js"; -import { SystemMessageManager } from "../managers/SystemMessage.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"; diff --git a/src/managers/StateManager.ts b/src/structures/StateManager.ts similarity index 100% rename from src/managers/StateManager.ts rename to src/structures/StateManager.ts diff --git a/src/managers/SystemMessage.ts b/src/structures/SystemMessage.ts similarity index 100% rename from src/managers/SystemMessage.ts rename to src/structures/SystemMessage.ts diff --git a/src/types/BaseCommand.ts b/src/types/BaseCommand.ts index 51f5863..65b82a9 100644 --- a/src/types/BaseCommand.ts +++ b/src/types/BaseCommand.ts @@ -2,7 +2,7 @@ import { MessageEmbed, ReplyMessageOptions, Message, CommandInteraction } from " import { InputParameter } from "../structures/Parameter.js"; import { ParameterResolvable } from "./Parameter.js"; import { PermissionCheckTypes, PermissionTypes } from "./permissions.js"; -import { BaseCommand } from "../structures/BaseCommand.js"; +import { BaseCommand } from "../commands/BaseCommand.js"; export interface BaseCommandInit { name: string; diff --git a/src/types/SystemMessage.ts b/src/types/SystemMessage.ts index e28033a..dc984ff 100644 --- a/src/types/SystemMessage.ts +++ b/src/types/SystemMessage.ts @@ -1,6 +1,6 @@ import { ColorResolvable, GuildMember, User } from "discord.js"; import { PermissionsError } from "../errors.js"; -import { BaseCommand } from "../structures/BaseCommand.js"; +import { BaseCommand } from "../commands/BaseCommand.js"; /** * @type Type of message diff --git a/src/types/commands.ts b/src/types/commands.ts index 67ec60b..d76ede4 100644 --- a/src/types/commands.ts +++ b/src/types/commands.ts @@ -1,7 +1,7 @@ -import { BaseCommand } from "../structures/BaseCommand.js"; -import { ChatCommand } from "../structures/ChatCommand.js"; -import { MessageCommand } from "../structures/MessageCommand.js"; -import { UserCommand } from "../structures/UserCommand.js"; +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"; export type CommandStructure = T extends "MESSAGE" ? MessageCommand : T extends "USER" ? UserCommand : T extends "CHAT" ? ChatCommand : BaseCommand;