Skip to content

Commit

Permalink
Adding mod channel check suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: ExampleWasTaken <[email protected]>
  • Loading branch information
pdellaert and ExampleWasTaken authored Oct 27, 2024
1 parent 6b533a2 commit 840eca6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ export async function handleDeletePrefixCommandVersion(interaction: ChatInputCom

//Check if the mod logs channel exists
const modLogsChannel = interaction.guild.channels.resolve(constantsConfig.channels.MOD_LOGS) as TextChannel;

Check failure on line 87 in src/commands/moderation/prefixCommands/functions/deleteVersion.ts

View workflow job for this annotation

GitHub Actions / build

Cannot redeclare block-scoped variable 'modLogsChannel'.
if (!modLogsChannel) {
await interaction.followUp({ embeds: [noModLogs], ephemeral: true });
let modLogsChannel = interaction.guild.channels.resolve(constantsConfig.channels.MOD_LOGS);

Check failure on line 88 in src/commands/moderation/prefixCommands/functions/deleteVersion.ts

View workflow job for this annotation

GitHub Actions / build

Cannot redeclare block-scoped variable 'modLogsChannel'.
if (!modLogsChannel || !modLogsChannel.isTextBased()) {
modLogsChannel = null;

Check failure on line 90 in src/commands/moderation/prefixCommands/functions/deleteVersion.ts

View workflow job for this annotation

GitHub Actions / build

Cannot assign to 'modLogsChannel' because it is a constant.
}

const existingVersion = await PrefixCommandVersion.findOne({ name: version });
Expand Down

0 comments on commit 840eca6

Please sign in to comment.