From 5e36318e1d78d47288ae89e47a8513ea00326fd3 Mon Sep 17 00:00:00 2001 From: xmnlz Date: Fri, 17 Nov 2023 16:39:57 +0100 Subject: [PATCH] fix(deferReply): added `deferReply` with `editReply` --- src/commands/curator/eventsmode.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/commands/curator/eventsmode.ts b/src/commands/curator/eventsmode.ts index 6a62bc8..3d3203d 100644 --- a/src/commands/curator/eventsmode.ts +++ b/src/commands/curator/eventsmode.ts @@ -84,6 +84,8 @@ export class Command { member: GuildMember, ctx: CommandInteraction<'cached'>, ) { + await ctx.deferReply({ ephemeral: true }); + const guild = await Guild.findOneBy({ id: ctx.guild.id }); const { isRolesConfigured, eventsmodeRoleId } = guild!.settingsManagement; @@ -115,7 +117,7 @@ export class Command { }), }); - await ctx.reply( + await ctx.editReply( embedResponse({ template: `Пользователь $1 был нанят как ${bold('Eventsmode')}`, replaceArgs: [userWithNameAndId(member.user), bold('Eventsmode')], @@ -136,6 +138,8 @@ export class Command { member: GuildMember, ctx: CommandInteraction<'cached'>, ) { + await ctx.deferReply({ ephemeral: true }); + const guild = await Guild.findOneBy({ id: ctx.guild.id }); const { isRolesConfigured, eventsmodeRoleId } = guild!.settingsManagement; @@ -167,7 +171,7 @@ export class Command { }), }); - await ctx.reply( + await ctx.editReply( embedResponse({ template: `$1 был снят с должности $3`, replaceArgs: [userWithNameAndId(member.user), bold('Eventsmode')], @@ -202,6 +206,8 @@ export class Command { staffRole: number, ctx: CommandInteraction<'cached'>, ) { + await ctx.deferReply({ ephemeral: true }); + const eventsmode = await Eventsmode.findOneBy({ userId: member.id, guild: { id: member.guild.id }, @@ -233,7 +239,7 @@ export class Command { }), }); - await ctx.reply( + await ctx.editReply( embedResponse({ template: `$1 был поставлен на должность $2`, replaceArgs: [userWithNameAndId(member.user), bold(getStuffRole(staffRole))],