styling fixes and some typing
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index 8e72651..52fdd5f 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -20,7 +20,7 @@
.setRequired(false)
);
-const callback = async (interaction: CommandInteraction): Promise<void | unknown> => {
+const callback = async (interaction: CommandInteraction): Promise<unknown> => {
const m = (await interaction.reply({
embeds: LoadingEmbed,
ephemeral: true,
@@ -191,7 +191,7 @@
const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
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;
};
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 21437b2..c645581 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -19,7 +19,7 @@
.addChannelTypes([ChannelType.GuildNews, ChannelType.GuildText])
);
-const callback = async (interaction: CommandInteraction): Promise<void | unknown> => {
+const callback = async (interaction: CommandInteraction): Promise<unknown> => {
const m = (await interaction.reply({
embeds: LoadingEmbed,
ephemeral: true,
@@ -185,7 +185,7 @@
const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
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;
};
diff --git a/src/commands/settings/logs/events.ts b/src/commands/settings/logs/events.ts
index a2dcc63..c3fbe41 100644
--- a/src/commands/settings/logs/events.ts
+++ b/src/commands/settings/logs/events.ts
@@ -117,7 +117,7 @@
const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
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;
};
diff --git a/src/commands/settings/logs/staff.ts b/src/commands/settings/logs/staff.ts
index 8450bbb..715fbea 100644
--- a/src/commands/settings/logs/staff.ts
+++ b/src/commands/settings/logs/staff.ts
@@ -21,7 +21,7 @@
.setRequired(false)
);
-const callback = async (interaction: CommandInteraction): Promise<unknown | void> => {
+const callback = async (interaction: CommandInteraction): Promise<unknown> => {
if (!interaction.guild) return;
const m = (await interaction.reply({
embeds: LoadingEmbed,
@@ -190,7 +190,7 @@
const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
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;
};