forked from Galactic/galactic-bot
catch promise
This commit is contained in:
parent
1a5f8d9276
commit
28266403f6
@ -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' });
|
||||
|
Loading…
Reference in New Issue
Block a user