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 f3cb925 commit 8c3a21e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ export async function handleSetPrefixCommandContent(interaction: ChatInputComman
return;
}
//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 });
}

Expand Down

0 comments on commit 8c3a21e

Please sign in to comment.