Fix some more eslint & ts errors
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index f37bd1a..ea8aa51 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -1,5 +1,5 @@
import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
-import { ChannelType } from "discord-api-types";
+import { ChannelType } from "discord-api-types/v9";
import Discord, {
CommandInteraction,
MessageActionRow,
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 00d2411..fd64424 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -1,5 +1,5 @@
import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
-import { ChannelType } from "discord-api-types";
+import { ChannelType } from "discord-api-types/v9";
import Discord, {
CommandInteraction,
MessageActionRow,
diff --git a/src/commands/settings/logs/staff.ts b/src/commands/settings/logs/staff.ts
index 718d13b..a0df97c 100644
--- a/src/commands/settings/logs/staff.ts
+++ b/src/commands/settings/logs/staff.ts
@@ -1,5 +1,5 @@
import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
-import { ChannelType } from "discord-api-types";
+import { ChannelType } from "discord-api-types/v9";
import Discord, {
CommandInteraction,
MessageActionRow,
@@ -9,7 +9,6 @@
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
import type { WrappedCheck } from "jshaiku";
import client from "../../../utils/client.js";
diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index 5e5cbe7..206e157 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -19,7 +19,7 @@
SelectMenuOption,
SlashCommandSubcommandBuilder
} from "@discordjs/builders";
-import { ChannelType } from "discord-api-types";
+import { ChannelType } from "discord-api-types/v9";
import client from "../../utils/client.js";
import {
toHexInteger,
diff --git a/src/commands/settings/welcome.ts b/src/commands/settings/welcome.ts
index 3eb0ec5..00b1826 100644
--- a/src/commands/settings/welcome.ts
+++ b/src/commands/settings/welcome.ts
@@ -8,12 +8,12 @@
MessageComponentInteraction,
Role
} from "discord.js";
-import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
+import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import client from "../../utils/client.js";
import confirmationMessage from "../../utils/confirmationMessage.js";
import generateKeyValueList from "../../utils/generateKeyValueList.js";
-import { ChannelType } from "discord-api-types";
+import { ChannelType } from "discord-api-types/v9";
import getEmojiByName from "../../utils/getEmojiByName.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
@@ -49,9 +49,7 @@
.addChannelTypes([ChannelType.GuildText, ChannelType.GuildNews])
);
-const callback = async (
- interaction: CommandInteraction
-): Promise<void | unknown> => {
+const callback = async (interaction: CommandInteraction): Promise<unknown> => {
const { renderRole, renderChannel, log, NucleusColors, entry, renderUser } =
client.logger;
await interaction.reply({
@@ -340,7 +338,9 @@
const check = (interaction: CommandInteraction) => {
const member = interaction.member as Discord.GuildMember;
if (!member.permissions.has("MANAGE_GUILD"))
- throw "You must have the *Manage Server* permission to use this command";
+ throw new Error(
+ "You must have the *Manage Server* permission to use this command"
+ );
return true;
};