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