We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f98a3d commit e1d03c7Copy full SHA for e1d03c7
src/commands/moderation/prefixCommands/functions/modifyCategory.ts
@@ -65,8 +65,9 @@ export async function handleModifyPrefixCommandCategory(interaction: ChatInputCo
65
const moderator = interaction.user;
66
67
//Check if the mod logs channel exists
68
- const modLogsChannel = interaction.guild.channels.resolve(constantsConfig.channels.MOD_LOGS) as TextChannel;
69
- if (!modLogsChannel) {
+ let modLogsChannel = interaction.guild.channels.resolve(constantsConfig.channels.MOD_LOGS);
+ if (!modLogsChannel || !modLogsChannel.isTextBased()) {
70
+ modLogsChannel = null;
71
await interaction.followUp({ embeds: [noModLogs], ephemeral: true });
72
}
73
0 commit comments