reverted import changes

This commit is contained in:
mmacierzanka committed 2022-01-15 17:08:21 +01:00
1 parent a750cf8398
commit 5a805517a8
21 files changed
+125 -126

No files matched your search

+20 -20
View File
@@ -1,4 +1,4 @@
import { Bot, InitOptions } from "./src/structures/Bot";
import { Bot, InitOptions } from "./src/structures/Bot.js";
import {
ObjectID,
TargetID,
@@ -12,8 +12,8 @@ import {
InputParameterValue,
ObjectIdReturnType,
TargetIdReturnType,
} from "./src/structures/Parameter";
import { PermissionsError, ParameterTypeError, MissingParameterError, OperationSuccess } from "./src/errors";
} from "./src/structures/Parameter.js";
import { PermissionsError, ParameterTypeError, MissingParameterError, OperationSuccess } from "./src/errors.js";
import {
ChildCommandType,
Commands,
@@ -28,7 +28,7 @@ import {
CommandFunctionReturnTypes,
BaseCommandType,
EphemeralType,
} from "./src/commands/commandsTypes";
} from "./src/commands/commandsTypes.js";
import {
APICommandObject,
APICommandType,
@@ -41,22 +41,22 @@ import {
RegisteredCommandObject,
SubCommandGroupObject,
TextCommandOptionChoiceObject,
} from "./src/structures/apiTypes";
import { InputManager } from "./src/structures/InputManager";
import { SubCommand, SubCommandInit } from "./src/commands/SubCommand";
import { SubCommandGroup, SubCommandGroupInit } from "./src/commands/SubCommandGroup";
import { ChatCommand, ChatCommandInit } from "./src/commands/ChatCommand";
import { ContextMenuCommand, ContextMenuCommandInit } from "./src/commands/ContextMenuCommand";
import { FunctionCommand, FunctionCommandInit } from "./src/commands/base/FunctionCommand";
import { APICommandInit, Command } from "./src/commands/base/Command";
import { CommandManager } from "./src/structures/CommandManager";
import { SystemMessageManager, MessageType, SystemMessageAppearance, SystemMessageData } from "./src/structures/SystemMessage";
import { CommandPermissions, CommandPermissionsInit, PermissionCheckTypes, PermissionFunction } from "./src/structures/CommandPermissions";
import { HelpMessage, HelpMessageParams } from "./src/commands/Help";
import { PrefixManager, ScopeResolvable } from "./src/structures/PrefixManager";
import { GuildCommand, GuildCommandInit } from "./src/commands/base/GuildCommand";
import { PermissionCommand, PermissionCommandInit } from "./src/commands/base/PermissionCommand";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./src/commands/base/PermissionGuildCommand";
} from "./src/structures/apiTypes.js";
import { InputManager } from "./src/structures/InputManager.js";
import { SubCommand, SubCommandInit } from "./src/commands/SubCommand.js";
import { SubCommandGroup, SubCommandGroupInit } from "./src/commands/SubCommandGroup.js";
import { ChatCommand, ChatCommandInit } from "./src/commands/ChatCommand.js";
import { ContextMenuCommand, ContextMenuCommandInit } from "./src/commands/ContextMenuCommand.js";
import { FunctionCommand, FunctionCommandInit } from "./src/commands/base/FunctionCommand.js";
import { APICommandInit, Command } from "./src/commands/base/Command.js";
import { CommandManager } from "./src/structures/CommandManager.js";
import { SystemMessageManager, MessageType, SystemMessageAppearance, SystemMessageData } from "./src/structures/SystemMessage.js";
import { CommandPermissions, CommandPermissionsInit, PermissionCheckTypes, PermissionFunction } from "./src/structures/CommandPermissions.js";
import { HelpMessage, HelpMessageParams } from "./src/commands/Help.js";
import { PrefixManager, ScopeResolvable } from "./src/structures/PrefixManager.js";
import { GuildCommand, GuildCommandInit } from "./src/commands/base/GuildCommand.js";
import { PermissionCommand, PermissionCommandInit } from "./src/commands/base/PermissionCommand.js";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./src/commands/base/PermissionGuildCommand.js";
export {
Bot,
+11 -11
View File
@@ -1,15 +1,15 @@
import { Message, Interaction, CommandInteractionOption } from "discord.js";
import { DefaultParameter, InputParameter, ObjectID, Parameter, ParameterSchema } from "../structures/Parameter";
import { ChatCommandObject, TextCommandOptionChoiceObject, ChatCommandOptionObject, ChatCommandOptionType } from "../structures/apiTypes";
import { ChildCommandInit, ChildCommandResolvable, ChildCommands, ChildCommandType, CommandRegExps } from "./commandsTypes";
import { CommandManager } from "../structures/CommandManager";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./base/PermissionGuildCommand";
import { generateUsageFromArguments } from "../utils/generateUsageFromArguments";
import { SubCommand, SubCommandInit } from "./SubCommand";
import { SubCommandGroup } from "./SubCommandGroup";
import { applicationState } from "../state";
import { InputManager } from "../structures/InputManager";
import { SubCommandGroupInit } from "./SubCommandGroup";
import { DefaultParameter, InputParameter, ObjectID, Parameter, ParameterSchema } from "../structures/Parameter.js";
import { ChatCommandObject, TextCommandOptionChoiceObject, ChatCommandOptionObject, ChatCommandOptionType } from "../structures/apiTypes.js";
import { ChildCommandInit, ChildCommandResolvable, ChildCommands, ChildCommandType, CommandRegExps } from "./commandsTypes.js";
import { CommandManager } from "../structures/CommandManager.js";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./base/PermissionGuildCommand.js";
import { generateUsageFromArguments } from "../utils/generateUsageFromArguments.js";
import { SubCommand, SubCommandInit } from "./SubCommand.js";
import { SubCommandGroup } from "./SubCommandGroup.js";
import { applicationState } from "../state.js";
import { InputManager } from "../structures/InputManager.js";
import { SubCommandGroupInit } from "./SubCommandGroup.js";
/**
* Intialization options of chat command
+4 -4
View File
@@ -1,7 +1,7 @@
import { CommandManager } from "../structures/CommandManager";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./base/PermissionGuildCommand";
import { ContextType } from "./commandsTypes";
import { ContextMenuCommandObject } from "../structures/apiTypes";
import { CommandManager } from "../structures/CommandManager.js";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./base/PermissionGuildCommand.js";
import { ContextType } from "./commandsTypes.js";
import { ContextMenuCommandObject } from "../structures/apiTypes.js";
/**
* Initialization options of context menu interactions
+5 -5
View File
@@ -1,9 +1,9 @@
import { Interaction, Message, MessageEmbed, Permissions, ColorResolvable } from "discord.js";
import { ChatCommand } from "./ChatCommand";
import { CommandManager } from "../structures/CommandManager";
import { SubCommand } from "./SubCommand";
import { SubCommandGroup } from "./SubCommandGroup";
import { EphemeralType } from "./commandsTypes";
import { ChatCommand } from "./ChatCommand.js";
import { CommandManager } from "../structures/CommandManager.js";
import { SubCommand } from "./SubCommand.js";
import { SubCommandGroup } from "./SubCommandGroup.js";
import { EphemeralType } from "./commandsTypes.js";
/**
* All properties used to customize the appearance of a help message
+8 -8
View File
@@ -1,11 +1,11 @@
import { generateUsageFromArguments } from "../utils/generateUsageFromArguments";
import { DefaultParameter, Parameter, ParameterSchema } from "../structures/Parameter";
import { PermissionCommand, PermissionCommandInit } from "./base/PermissionCommand";
import { SubCommandGroup } from "./SubCommandGroup";
import { CommandRegExps } from "./commandsTypes";
import { ChatCommandObject, ChatCommandOptionObject, ChatCommandOptionType, TextCommandOptionChoiceObject } from "../structures/apiTypes";
import { ChatCommand } from "./ChatCommand";
import { InputManager } from "../structures/InputManager";
import { generateUsageFromArguments } from "../utils/generateUsageFromArguments.js";
import { DefaultParameter, Parameter, ParameterSchema } from "../structures/Parameter.js";
import { PermissionCommand, PermissionCommandInit } from "./base/PermissionCommand.js";
import { SubCommandGroup } from "./SubCommandGroup.js";
import { CommandRegExps } from "./commandsTypes.js";
import { ChatCommandObject, ChatCommandOptionObject, ChatCommandOptionType, TextCommandOptionChoiceObject } from "../structures/apiTypes.js";
import { ChatCommand } from "./ChatCommand.js";
import { InputManager } from "../structures/InputManager.js";
/**
* Subcommand initialization options
+5 -5
View File
@@ -1,8 +1,8 @@
import { SubCommandGroupObject } from "../structures/apiTypes";
import { APICommandInit, Command } from "./base/Command";
import { ChatCommand } from "./ChatCommand";
import { SubCommand, SubCommandInit } from "./SubCommand";
import { CommandRegExps } from "./commandsTypes";
import { SubCommandGroupObject } from "../structures/apiTypes.js";
import { APICommandInit, Command } from "./base/Command.js";
import { ChatCommand } from "./ChatCommand.js";
import { SubCommand, SubCommandInit } from "./SubCommand.js";
import { CommandRegExps } from "./commandsTypes.js";
/**
* Intialization options of subcommand group
+9 -9
View File
@@ -1,12 +1,12 @@
import { BaseCommands, BaseCommandType, ChildCommands, ChildCommandType, Commands, CommandRegExps, CommandType } from "../commandsTypes";
import { CommandManager } from "../../structures/CommandManager";
import { APICommandObject } from "../../structures/apiTypes";
import { FunctionCommand } from "./FunctionCommand";
import { GuildCommand } from "./GuildCommand";
import { PermissionCommand } from "./PermissionCommand";
import { CommandPermissions } from "../../structures/CommandPermissions";
import { ChatCommand } from "../ChatCommand";
import { SubCommand } from "../SubCommand";
import { BaseCommands, BaseCommandType, ChildCommands, ChildCommandType, Commands, CommandRegExps, CommandType } from "../commandsTypes.js";
import { CommandManager } from "../../structures/CommandManager.js";
import { APICommandObject } from "../../structures/apiTypes.js";
import { FunctionCommand } from "./FunctionCommand.js";
import { GuildCommand } from "./GuildCommand.js";
import { PermissionCommand } from "./PermissionCommand.js";
import { CommandPermissions } from "../../structures/CommandPermissions.js";
import { ChatCommand } from "../ChatCommand.js";
import { SubCommand } from "../SubCommand.js";
/**
* Initialization options of core {@link Command} object
+5 -5
View File
@@ -1,9 +1,9 @@
import { Interaction, Message, MessageEmbed, ReplyMessageOptions } from "discord.js";
import { OperationSuccess } from "../../errors";
import { APICommandInit, Command } from "./Command";
import { CommandManager } from "../../structures/CommandManager";
import { CommandFunction, CommandType, EphemeralType } from "../commandsTypes";
import { InputManager } from "../../structures/InputManager";
import { OperationSuccess } from "../../errors.js";
import { APICommandInit, Command } from "./Command.js";
import { CommandManager } from "../../structures/CommandManager.js";
import { CommandFunction, CommandType, EphemeralType } from "../commandsTypes.js";
import { InputManager } from "../../structures/InputManager.js";
/**
* Initialization options of base executable command
+4 -4
View File
@@ -1,7 +1,7 @@
import { CommandManager } from "../../structures/CommandManager";
import { FunctionCommand, FunctionCommandInit } from "./FunctionCommand";
import { CommandType } from "../commandsTypes";
import { InputManager } from "../../structures/InputManager";
import { CommandManager } from "../../structures/CommandManager.js";
import { FunctionCommand, FunctionCommandInit } from "./FunctionCommand.js";
import { CommandType } from "../commandsTypes.js";
import { InputManager } from "../../structures/InputManager.js";
/**
* Initialization options of base guild-scoped command
+7 -7
View File
@@ -1,10 +1,10 @@
import { PermissionsError } from "../../errors";
import { CommandManager } from "../../structures/CommandManager";
import { CommandPermissions } from "../../structures/CommandPermissions";
import { FunctionCommand, FunctionCommandInit } from "./FunctionCommand";
import { CommandType } from "../commandsTypes";
import { InputManager } from "../../structures/InputManager";
import { CommandPermissionsInit } from "../../structures/CommandPermissions";
import { PermissionsError } from "../../errors.js";
import { CommandManager } from "../../structures/CommandManager.js";
import { CommandPermissions } from "../../structures/CommandPermissions.js";
import { FunctionCommand, FunctionCommandInit } from "./FunctionCommand.js";
import { CommandType } from "../commandsTypes.js";
import { InputManager } from "../../structures/InputManager.js";
import { CommandPermissionsInit } from "../../structures/CommandPermissions.js";
/**
* Initialization options of base command with attached permissions
+5 -5
View File
@@ -1,8 +1,8 @@
import { CommandManager } from "../../structures/CommandManager";
import { GuildCommand } from "./GuildCommand";
import { PermissionCommand, PermissionCommandInit } from "./PermissionCommand";
import { CommandType } from "../commandsTypes";
import { InputManager } from "../../structures/InputManager";
import { CommandManager } from "../../structures/CommandManager.js";
import { GuildCommand } from "./GuildCommand.js";
import { PermissionCommand, PermissionCommandInit } from "./PermissionCommand.js";
import { CommandType } from "../commandsTypes.js";
import { InputManager } from "../../structures/InputManager.js";
/**
* Initialization options of base guild-scoped command with attached permisisions
+6 -6
View File
@@ -1,10 +1,10 @@
import { MessageEmbed, ReplyMessageOptions } from "discord.js";
import { ChatCommand, ChatCommandInit } from "./ChatCommand";
import { ContextMenuCommand, ContextMenuCommandInit } from "./ContextMenuCommand";
import { SubCommand, SubCommandInit } from "./SubCommand";
import { SubCommandGroup, SubCommandGroupInit } from "./SubCommandGroup";
import { FunctionCommand, FunctionCommandInit } from "./base/FunctionCommand";
import { PermissionCommand, PermissionCommandInit } from "./base/PermissionCommand";
import { ChatCommand, ChatCommandInit } from "./ChatCommand.js";
import { ContextMenuCommand, ContextMenuCommandInit } from "./ContextMenuCommand.js";
import { SubCommand, SubCommandInit } from "./SubCommand.js";
import { SubCommandGroup, SubCommandGroupInit } from "./SubCommandGroup.js";
import { FunctionCommand, FunctionCommandInit } from "./base/FunctionCommand.js";
import { PermissionCommand, PermissionCommandInit } from "./base/PermissionCommand.js";
import { GuildCommand, GuildCommandInit } from "./base/GuildCommand.js";
import { PermissionGuildCommand, PermissionGuildCommandInit } from "./base/PermissionGuildCommand.js";
import { APICommandInit, Command } from "./base/Command.js";
+3 -3
View File
@@ -1,7 +1,7 @@
import { GuildMember } from "discord.js";
import { Command } from "./commands/base/Command";
import { Parameter } from "./structures/Parameter";
import { ParameterResolvable, ParameterType } from "./structures/Parameter";
import { Command } from "./commands/base/Command.js";
import { Parameter } from "./structures/Parameter.js";
import { ParameterResolvable, ParameterType } from "./structures/Parameter.js";
/**
* Error indicating that a caller doesn't have enough permissions to execute a command
+1 -1
View File
@@ -1,3 +1,3 @@
import { StateManager } from "./structures/StateManager";
import { StateManager } from "./structures/StateManager.js";
export const applicationState = new StateManager();
+7 -7
View File
@@ -1,13 +1,13 @@
import { Client, ClientOptions, CommandInteraction, GuildMember, Intents, Message } from "discord.js";
import { EventEmitter } from "events";
import * as http from "http";
import { CommandManager } from "./CommandManager";
import { CommandNotFound, OperationSuccess, PermissionsError } from "../errors";
import { SystemMessageManager } from "./SystemMessage";
import { applicationState } from "../state";
import { InputManager } from "./InputManager";
import { FunctionCommand } from "../commands/base/FunctionCommand";
import { HelpMessageParams } from "../commands/Help";
import { CommandManager } from "./CommandManager.js";
import { CommandNotFound, OperationSuccess, PermissionsError } from "../errors.js";
import { SystemMessageManager } from "./SystemMessage.js";
import { applicationState } from "../state.js";
import { InputManager } from "./InputManager.js";
import { FunctionCommand } from "../commands/base/FunctionCommand.js";
import { HelpMessageParams } from "../commands/Help.js";
/**
* Main object initialization options
+15 -15
View File
@@ -1,20 +1,20 @@
import axios, { AxiosResponse } from "axios";
import { Guild, Interaction, Message } from "discord.js";
import { InputParameter, ObjectID, TargetID } from "./Parameter";
import { CommandNotFound } from "../errors";
import { applicationState } from "../state";
import { ChatCommand, ChatCommandInit } from "../commands/ChatCommand";
import { ContextMenuCommand, ContextMenuCommandInit } from "../commands/ContextMenuCommand";
import { Commands, CommandInit, CommandRegExps, CommandType } from "../commands/commandsTypes";
import { APICommandObject, CommandPermission, RegisteredCommandObject, APICommandType } from "./apiTypes";
import { Bot } from "./Bot";
import { SubCommand } from "../commands/SubCommand";
import { SubCommandGroup } from "../commands/SubCommandGroup";
import { HelpMessageParams } from "../commands/Help";
import { HelpMessage } from "../commands/Help";
import { PrefixManager } from "./PrefixManager";
import { Command } from "../commands/base/Command";
import { InputManager } from "./InputManager";
import { InputParameter, ObjectID, TargetID } from "./Parameter.js";
import { CommandNotFound } from "../errors.js";
import { applicationState } from "../state.js";
import { ChatCommand, ChatCommandInit } from "../commands/ChatCommand.js";
import { ContextMenuCommand, ContextMenuCommandInit } from "../commands/ContextMenuCommand.js";
import { Commands, CommandInit, CommandRegExps, CommandType } from "../commands/commandsTypes.js";
import { APICommandObject, CommandPermission, RegisteredCommandObject, APICommandType } from "./apiTypes.js";
import { Bot } from "./Bot.js";
import { SubCommand } from "../commands/SubCommand.js";
import { SubCommandGroup } from "../commands/SubCommandGroup.js";
import { HelpMessageParams } from "../commands/Help.js";
import { HelpMessage } from "../commands/Help.js";
import { PrefixManager } from "./PrefixManager.js";
import { Command } from "../commands/base/Command.js";
import { InputManager } from "./InputManager.js";
/**
* Object that stores the registered commands and is responsible for data exchanging with the Discord API
+1 -1
View File
@@ -1,5 +1,5 @@
import { Interaction, Permissions, Message, PermissionResolvable } from "discord.js";
import { PermissionCommand } from "../commands/base/PermissionCommand";
import { PermissionCommand } from "../commands/base/PermissionCommand.js";
/**
* Permission checking methods
+2 -3
View File
@@ -1,7 +1,6 @@
import { Interaction, Message } from "discord.js";
import { FunctionCommand } from "../commands/base/FunctionCommand";
import { ParameterType, InputParameterValue } from "./Parameter";
import { InputParameter, TargetID } from "./Parameter";
import { FunctionCommand } from "../commands/base/FunctionCommand.js";
import { ParameterType, InputParameterValue, InputParameter, TargetID } from "./Parameter.js";
/**
* Object that stores all interaction input data (target, arguments, content and the interaction itself)
+2 -2
View File
@@ -1,6 +1,6 @@
import { CategoryChannel, Guild, GuildMember, Interaction, Message, NewsChannel, Role, StageChannel, StoreChannel, TextChannel, VoiceChannel } from "discord.js";
import { MissingParameterError, ParameterTypeError } from "../errors";
import { Command } from "../commands/base/Command";
import { MissingParameterError, ParameterTypeError } from "../errors.js";
import { Command } from "../commands/base/Command.js";
/**
* Parameter type values
+2 -2
View File
@@ -1,6 +1,6 @@
import { Guild } from "discord.js";
import { CommandManager } from "./CommandManager";
import { CommandRegExps } from "../commands/commandsTypes";
import { CommandManager } from "./CommandManager.js";
import { CommandRegExps } from "../commands/commandsTypes.js";
/**
* Prefix scope types
+3 -3
View File
@@ -1,7 +1,7 @@
import { ColorResolvable, DMChannel, GuildMember, Interaction, Message, MessageEmbed, Permissions, TextChannel, User } from "discord.js";
import { FunctionCommand } from "../commands/base/FunctionCommand";
import { PermissionsError } from "../errors";
import Bot from "./Bot";
import { FunctionCommand } from "../commands/base/FunctionCommand.js";
import { PermissionsError } from "../errors.js";
import Bot from "./Bot.js";
/**
* Types of system messages