hnng
This commit is contained in:
parent
f6e3f6c38d
commit
5f310e9494
@ -129,6 +129,9 @@ Successfully deleted the poll.
|
||||
[COMMAND_POLL_ENDED]
|
||||
Successfully ended the poll.
|
||||
|
||||
[COMMAND_POLL_MISSING_CHANNEL]
|
||||
Failed to find the poll's channel.
|
||||
|
||||
// Grantable
|
||||
[COMMAND_GRANTABLE_HELP]
|
||||
Lists roles grantable with the `/roles add|remove` command.
|
||||
|
@ -120,6 +120,7 @@ class PollCommand extends SlashCommand {
|
||||
if (!poll) return { index: 'COMMAND_POLL_404', emoji: 'failure' };
|
||||
await guild.removeCallback(poll.id);
|
||||
const pollChannel = await guild.resolveChannel(poll.channel);
|
||||
if(!channel) return { index: 'COMMAND_POLL_MISSING_CHANNEL', emoji: 'failure' };
|
||||
const msg = await pollChannel.messages.fetch(poll.message).catch(() => null);
|
||||
if(msg) await msg.delete();
|
||||
return { index: 'COMMAND_POLL_DELETED', emoji: 'success' };
|
||||
|
Loading…
Reference in New Issue
Block a user