From 841ea133f2373c3027a76402f3eacf094bcd727f Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 1 May 2024 17:28:12 +1000 Subject: [PATCH] Improve the response time --- src/components/Punish.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Punish.ts b/src/components/Punish.ts index 89b6057..77f7e0c 100644 --- a/src/components/Punish.ts +++ b/src/components/Punish.ts @@ -21,6 +21,8 @@ export default async(client:TClient, interaction: Discord.ChatInputCommandIntera if (!GuildMember && !['unban', 'ban'].includes(type)) return interaction.reply(`You cannot ${type} someone who is not in the server.`); if (User.bot) return interaction.reply(`You cannot ${type} a bot!`); - await interaction.deferReply({ephemeral: isInBKL}); - await client.punishments.punishmentAdd(type, {time, interaction}, interaction.user.id, reason, User, GuildMember); + await Promise.all([ + interaction.deferReply({ephemeral: isInBKL}), + client.punishments.punishmentAdd(type, {time, interaction}, interaction.user.id, reason, User, GuildMember) + ]); }