Clean up imports
This commit is contained in:
parent
5758cbd7f0
commit
8ee8bf5e9f
26 changed files with 10 additions and 63 deletions
|
@ -1,7 +1,6 @@
|
|||
import { Client } from "discord.js";
|
||||
import * as dotenv from "dotenv";
|
||||
import { createConnection } from "typeorm";
|
||||
import DefaultValues from "../constants/DefaultValues";
|
||||
import ICommandItem from "../contracts/ICommandItem";
|
||||
import IEventItem from "../contracts/IEventItem";
|
||||
import { Command } from "../type/command";
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
import { CommandInteraction, GuildMemberRoleManager, Interaction, Message, messageLink } from "discord.js";
|
||||
import { GuildMemberRoleManager, Interaction } from "discord.js";
|
||||
import { CommandResponse } from "../constants/CommandResponse";
|
||||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import ICommandItem from "../contracts/ICommandItem";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import StringTools from "../helpers/StringTools";
|
||||
import { CoreClient } from "./client";
|
||||
import { Util } from "./util";
|
||||
|
||||
export class Events {
|
||||
private _util: Util;
|
||||
|
||||
constructor() {
|
||||
this._util = new Util();
|
||||
}
|
||||
|
||||
public async onInteractionCreate(interaction: Interaction) {
|
||||
if (!interaction.isChatInputCommand()) return;
|
||||
if (!interaction.guild) return;
|
||||
|
|
|
@ -1,15 +1,7 @@
|
|||
// Required Components
|
||||
import { Client, Message, REST, Routes, SlashCommandBuilder } from "discord.js";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import ICommandItem from "../contracts/ICommandItem";
|
||||
import { Client, REST, Routes, SlashCommandBuilder } from "discord.js";
|
||||
import IEventItem from "../contracts/IEventItem";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import StringTools from "../helpers/StringTools";
|
||||
import { CommandResponse } from "../constants/CommandResponse";
|
||||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import { CoreClient } from "./client";
|
||||
|
||||
// Util Class
|
||||
export class Util {
|
||||
public loadSlashCommands(client: Client) {
|
||||
const registeredCommands = CoreClient.commandItems;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import EmbedColours from "../../constants/EmbedColours";
|
||||
import { ICommandContext } from "../../contracts/ICommandContext";
|
||||
import SettingsHelper from "../../helpers/SettingsHelper";
|
||||
import { Command } from "../../type/command";
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import { CommandInteraction, GuildMemberRoleManager, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
import { ICommandContext } from "../../contracts/ICommandContext";
|
||||
import { CommandInteraction, GuildMemberRoleManager, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../../type/command";
|
||||
import { default as eLobby } from "../../entity/501231711271780357/Lobby";
|
||||
import SettingsHelper from "../../helpers/SettingsHelper";
|
||||
import { readFileSync } from "fs";
|
||||
import BaseEntity from "../../contracts/BaseEntity";
|
||||
|
||||
export default class Lobby extends Command {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, EmbedBuilder, Interaction, SlashCommandBuilder } from "discord.js";
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import { Command } from "../type/command";
|
||||
|
||||
export default class About extends Command {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import AuditTools from "../helpers/AuditTools";
|
||||
import { Command } from "../type/command";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import { Command } from "../type/command";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import { CommandInteraction, EmbedBuilder, GuildMember, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Command } from "../type/command";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import randomBunny from "random-bunny";
|
||||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
|
||||
export default class Clear extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js";
|
||||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import { CommandResponse } from "../constants/CommandResponse";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import StringTools from "../helpers/StringTools";
|
||||
import { Command } from "../type/command";
|
||||
|
|
|
@ -3,7 +3,6 @@ import { readFileSync } from "fs";
|
|||
import { CommandResponse } from "../constants/CommandResponse";
|
||||
import DefaultValues from "../constants/DefaultValues";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Server from "../entity/Server";
|
||||
import Setting from "../entity/Setting";
|
||||
import { Command } from "../type/command";
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import { Command } from "../type/command";
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import IgnoredChannel from "../entity/IgnoredChannel";
|
||||
import { Command } from "../type/command";
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import { Command } from "../type/command";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import { CommandInteraction, EmbedBuilder, GuildMember, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { CommandInteraction, EmbedBuilder, GuildMember, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import { Command } from "../type/command";
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
import { CommandInteraction, EmbedBuilder, GuildMemberRoleManager, Role as DiscordRole, SlashCommandBuilder } from "discord.js";
|
||||
import { CommandInteraction, EmbedBuilder, GuildMemberRoleManager, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import { readFileSync } from "fs";
|
||||
import { default as eRole } from "../entity/Role";
|
||||
import Server from "../entity/Server";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
|
||||
export default class Role extends Command {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import { existsSync, readFileSync } from "fs";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import { Command } from "../type/command";
|
||||
|
||||
interface IRules {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Server from "../entity/Server";
|
||||
import { Command } from "../type/command";
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import { CommandInteraction, EmbedBuilder, GuildMember, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import { Command } from "../type/command";
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { CommandInteraction, EmbedBuilder, GuildMember, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import ErrorMessages from "../constants/ErrorMessages";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import { Command } from "../type/command";
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import { Message } from "discord.js";
|
||||
|
||||
export interface ICommandContext {
|
||||
name: string;
|
||||
args: string[];
|
||||
message: Message;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import { Column, Entity, getConnection, ManyToOne } from "typeorm";
|
||||
import { Column, Entity, getConnection } from "typeorm";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
import BaseEntity from "../contracts/BaseEntity";
|
||||
import StringTools from "../helpers/StringTools";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Column, Entity, EntityTarget, getConnection, ManyToOne } from "typeorm";
|
||||
import { Column, Entity, getConnection, ManyToOne } from "typeorm";
|
||||
import BaseEntity from "../contracts/BaseEntity"
|
||||
import Server from "./Server";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Event } from "../type/event";
|
||||
import { EmbedBuilder, GuildChannel, GuildMember, TextChannel } from "discord.js";
|
||||
import { EmbedBuilder, GuildMember, TextChannel } from "discord.js";
|
||||
import GuildMemberUpdate from "./MemberEvents/GuildMemberUpdate";
|
||||
import SettingsHelper from "../helpers/SettingsHelper";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { CommandResponse } from "../constants/CommandResponse";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import { CommandInteraction, Interaction, SlashCommandBuilder } from "discord.js";
|
||||
import { CommandInteraction } from "discord.js";
|
||||
|
||||
export class Command {
|
||||
public CommandBuilder: any;
|
||||
|
|
Loading…
Reference in a new issue