Fix: Add empty function to catch clauses

This commit is contained in:
2022-11-29 00:23:19 +01:00
parent f7c878854b
commit 361326c31e
8 changed files with 20 additions and 20 deletions

View File

@@ -35,7 +35,7 @@ async function resetNotificationChannel(guildSetting: GuildSetting, interaction:
if (logChannel && logChannel.isTextBased()) {
logChannel.send({
embeds: [logEmbed]
}).catch();
}).catch(() => {});
}
const embed = getSuccessEmbed();
@@ -43,7 +43,7 @@ async function resetNotificationChannel(guildSetting: GuildSetting, interaction:
interaction.reply({
embeds: [embed],
ephemeral: true
}).catch();
}).catch(() => {});
}
const execute = async (interaction: ChatInputCommandInteraction) => {
@@ -64,7 +64,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
interaction.reply({
embeds: [ embed ],
ephemeral: true
}).catch();
}).catch(() => {});
return;
}
@@ -82,7 +82,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
if (oldLogChannel && oldLogChannel.isTextBased()) {
oldLogChannel.send({
embeds: [embed]
}).catch();
}).catch(() => {});
}
}
@@ -99,7 +99,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
channel.send({
embeds: [embed]
}).catch();
}).catch(() => {});
const reply = getSuccessEmbed();
reply.setDescription(`Log channel was set to <#${channel.id}>`);
@@ -107,7 +107,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
interaction.reply({
embeds: [reply],
ephemeral: true
}).catch();
}).catch(() => {});
return;
}