diff --git a/src/buttonEvents/Series.ts b/src/buttonEvents/Series.ts index 357a963..0d98bfb 100644 --- a/src/buttonEvents/Series.ts +++ b/src/buttonEvents/Series.ts @@ -8,15 +8,15 @@ export default class Series extends ButtonEvent { const subaction = interaction.customId.split(" ")[1]; switch(subaction) { - case "view": - await this.ViewSeries(interaction); - break; - case "list": - await this.ListSeries(interaction); - break; - default: - AppLogger.LogWarn("Commands/Series", `Subaction doesn't exist: ${subaction}`); - interaction.reply("Subaction doesn't exist."); + case "view": + await this.ViewSeries(interaction); + break; + case "list": + await this.ListSeries(interaction); + break; + default: + AppLogger.LogWarn("Commands/Series", `Subaction doesn't exist: ${subaction}`); + interaction.reply("Subaction doesn't exist."); } } diff --git a/src/commands/series.ts b/src/commands/series.ts index ee82b76..2122355 100644 --- a/src/commands/series.ts +++ b/src/commands/series.ts @@ -1,7 +1,6 @@ -import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js"; +import { CommandInteraction, SlashCommandBuilder } from "discord.js"; import { Command } from "../type/command"; import { CoreClient } from "../client/client"; -import EmbedColours from "../constants/EmbedColours"; import AppLogger from "../client/appLogger"; import SeriesHelper from "../helpers/SeriesHelper"; @@ -24,22 +23,22 @@ export default class Series extends Command { .addSubcommand(x => x .setName("list") - .setDescription("List all series")); + .setDescription("List all series")) as SlashCommandBuilder; } public override async execute(interaction: CommandInteraction) { if (!interaction.isChatInputCommand()) return; switch (interaction.options.getSubcommand()) { - case "view": - await this.ViewSeries(interaction); - break; - case "list": - await this.ListSeries(interaction); - break; - default: - AppLogger.LogWarn("Commands/Series", `Subcommand doesn't exist: ${interaction.options.getSubcommand()}`); - await interaction.reply("Subcommand doesn't exist."); + case "view": + await this.ViewSeries(interaction); + break; + case "list": + await this.ListSeries(interaction); + break; + default: + AppLogger.LogWarn("Commands/Series", `Subcommand doesn't exist: ${interaction.options.getSubcommand()}`); + await interaction.reply("Subcommand doesn't exist."); } } diff --git a/src/type/command.ts b/src/type/command.ts index 409a4ca..20f5e3a 100644 --- a/src/type/command.ts +++ b/src/type/command.ts @@ -1,7 +1,7 @@ -import { CommandInteraction } from "discord.js"; +import { CommandInteraction, SlashCommandBuilder } from "discord.js"; export abstract class Command { - public CommandBuilder: any; + public CommandBuilder: Omit; abstract execute(interaction: CommandInteraction): Promise; }