diff --git a/src/commands/moderation/prefixCommands/functions/deleteCommand.ts b/src/commands/moderation/prefixCommands/functions/deleteCommand.ts index b764ded6..085e61e4 100644 --- a/src/commands/moderation/prefixCommands/functions/deleteCommand.ts +++ b/src/commands/moderation/prefixCommands/functions/deleteCommand.ts @@ -75,8 +75,9 @@ export async function handleDeletePrefixCommand(interaction: ChatInputCommandInt const moderator = interaction.user; //Check if the mod logs channel exists - const modLogsChannel = interaction.guild.channels.resolve(constantsConfig.channels.MOD_LOGS) as TextChannel; - if (!modLogsChannel) { + let modLogsChannel = interaction.guild.channels.resolve(constantsConfig.channels.MOD_LOGS); + if (!modLogsChannel || !modLogsChannel.isTextBased()) { + modLogsChannel = null; await interaction.followUp({ embeds: [noModLogs], ephemeral: true }); }