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 9cf7803 commit c8a05d9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ export async function handleAddPrefixCommandVersion(interaction: ChatInputComman
}

//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 c8a05d9

Please sign in to comment.