From 28266403f64dbd682ee94bcb94db08be47675319 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sun, 17 Jul 2022 12:31:12 +0300 Subject: [PATCH] catch promise --- src/structure/components/commands/utility/Poll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structure/components/commands/utility/Poll.js b/src/structure/components/commands/utility/Poll.js index 77c9eb6..99a9a28 100644 --- a/src/structure/components/commands/utility/Poll.js +++ b/src/structure/components/commands/utility/Poll.js @@ -68,7 +68,7 @@ class PollCommand extends SlashCommand { time: 90, editReply: true }); if (!response || !response.content) return invoker.editReply({ index: 'COMMAND_POLL_TIMEOUT' }); - if(invoker.channel.permissionsFor(guild.me).has('MANAGE_MESSAGES')) await response.delete(); + if(invoker.channel.permissionsFor(guild.me).has('MANAGE_MESSAGES')) await response.delete().catch(() => null); const { content } = response; if (content.toLowerCase() === 'stop') break; if (content.toLowerCase() === 'cancel') return invoker.editReply({ index: 'GENERAL_CANCELLED' });