Archived
changed folder structure
This commit is contained in:
1 parent
10cbfdddf7
commit
383965c3d6
17 files changed
+19
-19
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
import { Bot } from "./src/structures/Bot.js";
|
import { Bot } from "./src/structures/Bot.js";
|
||||||
import { ChatCommand } from "./src/structures/ChatCommand.js";
|
import { ChatCommand } from "./src/commands/ChatCommand.js";
|
||||||
import { MessageCommand } from "./src/structures/MessageCommand.js";
|
import { MessageCommand } from "./src/commands/MessageCommand.js";
|
||||||
import { UserCommand } from "./src/structures/UserCommand.js";
|
import { UserCommand } from "./src/commands/UserCommand.js";
|
||||||
import { InitOptions } from "./src/types/Bot.js";
|
import { InitOptions } from "./src/types/Bot.js";
|
||||||
import { ChatCommandInit } from "./src/types/ChatCommand.js";
|
import { ChatCommandInit } from "./src/types/ChatCommand.js";
|
||||||
import { HelpMessageParams } from "./src/types/HelpMessage.js";
|
import { HelpMessageParams } from "./src/types/HelpMessage.js";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Interaction, Message, Permissions, ReplyMessageOptions, MessageEmbed, GuildMember } from "discord.js";
|
import { Interaction, Message, Permissions, ReplyMessageOptions, MessageEmbed, GuildMember } from "discord.js";
|
||||||
import { PermissionCheckTypes } from "../types/permissions.js";
|
import { PermissionCheckTypes } from "../types/permissions.js";
|
||||||
import { CommandType, BaseCommandInit, CommandFunction } from "../types/BaseCommand.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 { OperationSuccess, PermissionsError } from "../errors.js";
|
||||||
import { BaseCommandObject } from "../types/api.js";
|
import { BaseCommandObject } from "../types/api.js";
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Message, Interaction } from "discord.js";
|
import { Message, Interaction } from "discord.js";
|
||||||
import { BaseCommand } from "./BaseCommand.js";
|
import { BaseCommand } from "./BaseCommand.js";
|
||||||
import { ChatCommandInit } from "../types/ChatCommand.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";
|
import { TextCommandObject, TextCommandOptionChoiceObject, TextCommandOptionObject } from "../types/api.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { BaseCommand } from "./structures/BaseCommand.js";
|
import { BaseCommand } from "./commands/BaseCommand.js";
|
||||||
import { GuildMember } from "discord.js";
|
import { GuildMember } from "discord.js";
|
||||||
import { Parameter } from "./structures/Parameter.js";
|
import { Parameter } from "./structures/Parameter.js";
|
||||||
import { ParameterType } from "./types/Parameter.js";
|
import { ParameterType } from "./types/Parameter.js";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { CommandInteraction, Message } from "discord.js";
|
|||||||
import { CommandNotFound, MissingParameterError } from "../errors.js";
|
import { CommandNotFound, MissingParameterError } from "../errors.js";
|
||||||
import { BooleanParameter, InputParameter, NullParameter, NumberParameter, ObjectParameter, Parameter, StringParameter } from "../structures/Parameter.js";
|
import { BooleanParameter, InputParameter, NullParameter, NumberParameter, ObjectParameter, Parameter, StringParameter } from "../structures/Parameter.js";
|
||||||
import { CommandInteractionData } from "../types/commands.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 { CommandManager } from "./CommandManager.js";
|
||||||
import { ParameterResolvable } from "../types/Parameter.js";
|
import { ParameterResolvable } from "../types/Parameter.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { applicationState } from "../state.js";
|
import { applicationState } from "../state.js";
|
||||||
import { BaseCommand } from "../structures/BaseCommand.js";
|
import { BaseCommand } from "../commands/BaseCommand.js";
|
||||||
|
|
||||||
export class CommandManager {
|
export class CommandManager {
|
||||||
protected readonly _list: BaseCommand[] = [];
|
protected readonly _list: BaseCommand[] = [];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Interaction } from "discord.js";
|
import { Interaction } from "discord.js";
|
||||||
import { CommandInteractionData } from "../types/commands.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 { CommandManager } from "./CommandManager.js";
|
||||||
import { CommandNotFound } from "../errors.js";
|
import { CommandNotFound } from "../errors.js";
|
||||||
import { Parameter, TargetID, TargetParameter } from "../structures/Parameter.js";
|
import { Parameter, TargetID, TargetParameter } from "../structures/Parameter.js";
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
import { StateManager } from "./managers/StateManager.js";
|
import { StateManager } from "./structures/StateManager.js";
|
||||||
|
|
||||||
export const applicationState = new StateManager();
|
export const applicationState = new StateManager();
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Client, CommandInteraction, GuildMember, Intents, Message } from "discord.js";
|
import { Client, CommandInteraction, GuildMember, Intents, Message } from "discord.js";
|
||||||
import { EventEmitter } from "events";
|
import { EventEmitter } from "events";
|
||||||
import * as http from "http";
|
import * as http from "http";
|
||||||
import { ChatCommand } from "./ChatCommand.js";
|
import { ChatCommand } from "../commands/ChatCommand.js";
|
||||||
import { ChatCommandManager } from "../managers/ChatCommandManager.js";
|
import { ChatCommandManager } from "../managers/ChatCommandManager.js";
|
||||||
import { CommandNotFound, OperationSuccess, PermissionsError } from "../errors.js";
|
import { CommandNotFound, OperationSuccess, PermissionsError } from "../errors.js";
|
||||||
import { HelpMessage } from "./Help.js";
|
import { HelpMessage } from "../commands/Help.js";
|
||||||
import { SystemMessageManager } from "../managers/SystemMessage.js";
|
import { SystemMessageManager } from "./SystemMessage.js";
|
||||||
import { CommandInteractionData } from "../types/commands.js";
|
import { CommandInteractionData } from "../types/commands.js";
|
||||||
import { InitOptions } from "../types/Bot.js";
|
import { InitOptions } from "../types/Bot.js";
|
||||||
import { HelpMessageParams } from "../types/HelpMessage.js";
|
import { HelpMessageParams } from "../types/HelpMessage.js";
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@ import { MessageEmbed, ReplyMessageOptions, Message, CommandInteraction } from "
|
|||||||
import { InputParameter } from "../structures/Parameter.js";
|
import { InputParameter } from "../structures/Parameter.js";
|
||||||
import { ParameterResolvable } from "./Parameter.js";
|
import { ParameterResolvable } from "./Parameter.js";
|
||||||
import { PermissionCheckTypes, PermissionTypes } from "./permissions.js";
|
import { PermissionCheckTypes, PermissionTypes } from "./permissions.js";
|
||||||
import { BaseCommand } from "../structures/BaseCommand.js";
|
import { BaseCommand } from "../commands/BaseCommand.js";
|
||||||
|
|
||||||
export interface BaseCommandInit {
|
export interface BaseCommandInit {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ColorResolvable, GuildMember, User } from "discord.js";
|
import { ColorResolvable, GuildMember, User } from "discord.js";
|
||||||
import { PermissionsError } from "../errors.js";
|
import { PermissionsError } from "../errors.js";
|
||||||
import { BaseCommand } from "../structures/BaseCommand.js";
|
import { BaseCommand } from "../commands/BaseCommand.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type Type of message
|
* @type Type of message
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { BaseCommand } from "../structures/BaseCommand.js";
|
import { BaseCommand } from "../commands/BaseCommand.js";
|
||||||
import { ChatCommand } from "../structures/ChatCommand.js";
|
import { ChatCommand } from "../commands/ChatCommand.js";
|
||||||
import { MessageCommand } from "../structures/MessageCommand.js";
|
import { MessageCommand } from "../commands/MessageCommand.js";
|
||||||
import { UserCommand } from "../structures/UserCommand.js";
|
import { UserCommand } from "../commands/UserCommand.js";
|
||||||
import { InputParameter } from "../structures/Parameter.js";
|
import { InputParameter } from "../structures/Parameter.js";
|
||||||
|
|
||||||
export type CommandStructure<T> = T extends "MESSAGE" ? MessageCommand : T extends "USER" ? UserCommand : T extends "CHAT" ? ChatCommand : BaseCommand;
|
export type CommandStructure<T> = T extends "MESSAGE" ? MessageCommand : T extends "USER" ? UserCommand : T extends "CHAT" ? ChatCommand : BaseCommand;
|
||||||
|
|||||||
Reference in new issue
Block a user