mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 19:34:13 +02:00
refactor(arabot): change ephemeral for warnings
This commit is contained in:
parent
d9c4f54299
commit
0bb10b55ed
@ -82,7 +82,7 @@ export class WarnCommand extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await interaction.deferReply({ ephemeral: true });
|
await interaction.deferReply();
|
||||||
|
|
||||||
const info = await this.warn(user.id, mod.id, reason, guild);
|
const info = await this.warn(user.id, mod.id, reason, guild);
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import { ChannelType, EmbedBuilder } from 'discord.js';
|
|||||||
import type { Message, Guild, User } from 'discord.js';
|
import type { Message, Guild, User } from 'discord.js';
|
||||||
import IDs from '#utils/ids';
|
import IDs from '#utils/ids';
|
||||||
import { fetchWarnings } from '#utils/database/warnings';
|
import { fetchWarnings } from '#utils/database/warnings';
|
||||||
|
import { checkStaff } from '#utils/checker';
|
||||||
|
|
||||||
export class WarningsCommand extends Command {
|
export class WarningsCommand extends Command {
|
||||||
public constructor(context: Command.LoaderContext, options: Command.Options) {
|
public constructor(context: Command.LoaderContext, options: Command.Options) {
|
||||||
@ -69,7 +70,9 @@ export class WarningsCommand extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await interaction.deferReply({ ephemeral: true });
|
const staffChannel = checkStaff(interaction.channel);
|
||||||
|
|
||||||
|
await interaction.deferReply({ ephemeral: !staffChannel });
|
||||||
|
|
||||||
const info = await this.warnings(user, guild);
|
const info = await this.warnings(user, guild);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user