Skip to content

Commit

Permalink
Add protections to ai mod adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Nov 22, 2023
1 parent 501bfd1 commit 0399a7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/discord/commands/guild/d.ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ async function saveThreshold(
interaction: ButtonInteraction,
):Promise<void> {
log.debug(F, 'saveThreshold started');
if (!(interaction.member as GuildMember).roles.cache.has(env.DISCORD_OWNER_ID)) return;
const buttonID = interaction.customId;
log.debug(F, `buttonID: ${buttonID}`);
if (!interaction.guild) return;
Expand Down Expand Up @@ -934,6 +935,7 @@ async function adjustThreshold(
interaction: ButtonInteraction,
):Promise<void> {
log.debug(F, 'adjustThreshold started');
if (!(interaction.member as GuildMember).roles.cache.has(env.DISCORD_OWNER_ID)) return;
// const buttonID = interaction.customId;
// log.debug(F, `buttonID: ${buttonID}`);

Expand Down

0 comments on commit 0399a7c

Please sign in to comment.