Skip to content

Commit

Permalink
fix: Use isNote and isReport
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Aug 25, 2024
1 parent 722c2be commit b4c5df0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/discord/commands/guild/d.moderate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ export async function moderate(
}

let description = '';
if (command !== 'NOTE' && command !== 'REPORT') {
if (!isNote(command) && !isReport(command)) {
description = modalInt.fields.getTextInputValue('description');
}
let internalNote = modalInt.fields.getTextInputValue('internalNote');
Expand Down Expand Up @@ -1706,7 +1706,7 @@ export async function moderate(
> ${modalInt.fields.getTextInputValue('internalNote')}
Message sent to user:
> ${command !== 'NOTE' && command !== 'REPORT' ? modalInt.fields.getTextInputValue('description') : ''}`,
> ${!isNote(command) && !isReport(command) ? modalInt.fields.getTextInputValue('description') : ''}`,
inline: true,
},
);
Expand All @@ -1728,7 +1728,7 @@ export async function moderate(
.setDescription(desc)
.setFooter(null);

if (command !== 'REPORT' && modThread) response.setDescription(`${response.data.description}\nYou can access their thread here: ${modThread}`);
if (!isReport(command) && modThread) response.setDescription(`${response.data.description}\nYou can access their thread here: ${modThread}`);

log.debug(F, `Returning embed: ${JSON.stringify(response, null, 2)}`);
return { embeds: [response] };
Expand Down Expand Up @@ -2064,7 +2064,7 @@ export async function modModal(
// log.error(F, `Error: ${err}`);
}
}
if (command !== 'REPORT' && command !== 'NOTE') {
if (!isNote(command) && !isReport(command)) {
await i.editReply(await moderate(interaction, i));
}
})
Expand Down

0 comments on commit b4c5df0

Please sign in to comment.