diff --git a/src/client/client.ts b/src/client/client.ts index 0eb2c81..4031f24 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -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"; diff --git a/src/client/events.ts b/src/client/events.ts index 79f618f..bfc61c0 100644 --- a/src/client/events.ts +++ b/src/client/events.ts @@ -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; diff --git a/src/client/util.ts b/src/client/util.ts index 832a84b..7a23542 100644 --- a/src/client/util.ts +++ b/src/client/util.ts @@ -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; diff --git a/src/commands/501231711271780357/entry.ts b/src/commands/501231711271780357/entry.ts index f4e206d..9f8c92e 100644 --- a/src/commands/501231711271780357/entry.ts +++ b/src/commands/501231711271780357/entry.ts @@ -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"; diff --git a/src/commands/501231711271780357/lobby.ts b/src/commands/501231711271780357/lobby.ts index 023cfa3..d03ba53 100644 --- a/src/commands/501231711271780357/lobby.ts +++ b/src/commands/501231711271780357/lobby.ts @@ -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 { diff --git a/src/commands/about.ts b/src/commands/about.ts index b743d05..30fb6ad 100644 --- a/src/commands/about.ts +++ b/src/commands/about.ts @@ -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 { diff --git a/src/commands/audits.ts b/src/commands/audits.ts index 264f3d9..a88f32f 100644 --- a/src/commands/audits.ts +++ b/src/commands/audits.ts @@ -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"; diff --git a/src/commands/ban.ts b/src/commands/ban.ts index 07e4f48..37ca2a6 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -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"; diff --git a/src/commands/bunny.ts b/src/commands/bunny.ts index 76f6b79..cf28dff 100644 --- a/src/commands/bunny.ts +++ b/src/commands/bunny.ts @@ -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"; diff --git a/src/commands/clear.ts b/src/commands/clear.ts index 4412d44..160ec07 100644 --- a/src/commands/clear.ts +++ b/src/commands/clear.ts @@ -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() { diff --git a/src/commands/code.ts b/src/commands/code.ts index 52f6090..f3fed94 100644 --- a/src/commands/code.ts +++ b/src/commands/code.ts @@ -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"; diff --git a/src/commands/config.ts b/src/commands/config.ts index bdec5a5..60cd73d 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -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"; diff --git a/src/commands/disable.ts b/src/commands/disable.ts index 07c4cf6..4ad4af8 100644 --- a/src/commands/disable.ts +++ b/src/commands/disable.ts @@ -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"; diff --git a/src/commands/ignore.ts b/src/commands/ignore.ts index 7fe87d8..bb5124e 100644 --- a/src/commands/ignore.ts +++ b/src/commands/ignore.ts @@ -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"; diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 7eb50ec..8a520d6 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -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"; diff --git a/src/commands/mute.ts b/src/commands/mute.ts index 751b656..312eff3 100644 --- a/src/commands/mute.ts +++ b/src/commands/mute.ts @@ -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"; diff --git a/src/commands/role.ts b/src/commands/role.ts index 4ed1bae..8e0eaaa 100644 --- a/src/commands/role.ts +++ b/src/commands/role.ts @@ -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 { diff --git a/src/commands/rules.ts b/src/commands/rules.ts index 02291cf..180f779 100644 --- a/src/commands/rules.ts +++ b/src/commands/rules.ts @@ -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 { diff --git a/src/commands/setup.ts b/src/commands/setup.ts index f788de2..63a0fc8 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -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"; diff --git a/src/commands/unmute.ts b/src/commands/unmute.ts index 5fc6e0a..c40360c 100644 --- a/src/commands/unmute.ts +++ b/src/commands/unmute.ts @@ -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"; diff --git a/src/commands/warn.ts b/src/commands/warn.ts index 8bc69c2..1280983 100644 --- a/src/commands/warn.ts +++ b/src/commands/warn.ts @@ -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"; diff --git a/src/contracts/ICommandContext.ts b/src/contracts/ICommandContext.ts deleted file mode 100644 index 78f0d17..0000000 --- a/src/contracts/ICommandContext.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Message } from "discord.js"; - -export interface ICommandContext { - name: string; - args: string[]; - message: Message; -} \ No newline at end of file diff --git a/src/entity/Audit.ts b/src/entity/Audit.ts index 0ec1ea7..448913d 100644 --- a/src/entity/Audit.ts +++ b/src/entity/Audit.ts @@ -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"; diff --git a/src/entity/Role.ts b/src/entity/Role.ts index 5b534ad..e4b2da7 100644 --- a/src/entity/Role.ts +++ b/src/entity/Role.ts @@ -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"; diff --git a/src/events/MemberEvents.ts b/src/events/MemberEvents.ts index ef935da..fabf0b9 100644 --- a/src/events/MemberEvents.ts +++ b/src/events/MemberEvents.ts @@ -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"; diff --git a/src/type/command.ts b/src/type/command.ts index ad99790..6fea8c3 100644 --- a/src/type/command.ts +++ b/src/type/command.ts @@ -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;