refactor(arabot): change ephemeral for warnings

This commit is contained in:
Anthony Berg 2024-01-04 12:49:35 +00:00
parent d9c4f54299
commit 0bb10b55ed
2 changed files with 5 additions and 2 deletions

View File

@ -82,7 +82,7 @@ export class WarnCommand extends Command {
return;
}
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply();
const info = await this.warn(user.id, mod.id, reason, guild);

View File

@ -22,6 +22,7 @@ import { ChannelType, EmbedBuilder } from 'discord.js';
import type { Message, Guild, User } from 'discord.js';
import IDs from '#utils/ids';
import { fetchWarnings } from '#utils/database/warnings';
import { checkStaff } from '#utils/checker';
export class WarningsCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
@ -69,7 +70,9 @@ export class WarningsCommand extends Command {
return;
}
await interaction.deferReply({ ephemeral: true });
const staffChannel = checkStaff(interaction.channel);
await interaction.deferReply({ ephemeral: !staffChannel });
const info = await this.warnings(user, guild);