From 753432278479da9f27b4210507a8ed0442b771bd Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Wed, 12 Jul 2023 22:45:21 +0200 Subject: [PATCH] fix: defer confirmation on filters command --- commands/filters.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/commands/filters.js b/commands/filters.js index f085f75..15ca651 100644 --- a/commands/filters.js +++ b/commands/filters.js @@ -99,6 +99,8 @@ module.exports = { time: 60000 }); + confirmation.deferUpdate(); + queue.filters.ffmpeg.setInputArgs([ '-threads', filterThreadAmount, @@ -164,16 +166,11 @@ module.exports = { components: [] }); } catch (e) { - return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setDescription( - `**Cancelled**\nNo confirmation received within 1 minute.` - ) - .setColor(embedColors.colorWarning) - ], - components: [] - }); + if (e.code === 'InteractionCollectorError') { + return; + } + + throw e; } } };