diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-05-28 20:13:49 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-05-28 20:13:49 -0400 |
commit | 25cf269e2e793de5fefb9aa3f19fb167168e06c6 (patch) | |
tree | cd5f2f3c097a84a2483a70b57b3cbba7b6f4a6be /src/commands/moulberry-bush/giveawayPing.ts | |
parent | e220f8462bbfb26e3237df34923be4acc5d83fee (diff) | |
download | tanzanite-25cf269e2e793de5fefb9aa3f19fb167168e06c6.tar.gz tanzanite-25cf269e2e793de5fefb9aa3f19fb167168e06c6.tar.bz2 tanzanite-25cf269e2e793de5fefb9aa3f19fb167168e06c6.zip |
stuff
Diffstat (limited to 'src/commands/moulberry-bush/giveawayPing.ts')
-rw-r--r-- | src/commands/moulberry-bush/giveawayPing.ts | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts index 06cb254..e11585a 100644 --- a/src/commands/moulberry-bush/giveawayPing.ts +++ b/src/commands/moulberry-bush/giveawayPing.ts @@ -15,14 +15,7 @@ export default class GiveawayPingCommand extends BushCommand { examples: ['giveawayping'] }, clientPermissions: ['MANAGE_MESSAGES'], - userPermissions: [ - 'SEND_MESSAGES', - 'MANAGE_GUILD', - 'MANAGE_MESSAGES', - 'BAN_MEMBERS', - 'KICK_MEMBERS', - 'VIEW_CHANNEL' - ], + userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD', 'MANAGE_MESSAGES', 'BAN_MEMBERS', 'KICK_MEMBERS', 'VIEW_CHANNEL'], channel: 'guild', ignoreCooldown: [], ignorePermissions: [], @@ -32,21 +25,14 @@ export default class GiveawayPingCommand extends BushCommand { }); } public async exec(message: Message): Promise<unknown> { - if (message.guild.id !== '516977525906341928') - return message.reply( - "<:error:837123021016924261> This command may only be run in Moulberry's Bush." - ); + if (message.guild.id !== '516977525906341928') return message.reply("<:error:837123021016924261> This command may only be run in Moulberry's Bush."); if (!['767782084981817344', '833855738501267456'].includes(message.channel.id)) - return message.reply( - '<:error:837123021016924261> This command may only be run in giveaway channels.' - ); + return message.reply('<:error:837123021016924261> This command may only be run in giveaway channels.'); await message.delete().catch(() => undefined); const webhooks = await (message.channel as TextChannel | NewsChannel).fetchWebhooks(); let webhookClient: WebhookClient; if (webhooks.size < 1) { - const webhook = await (message.channel as TextChannel | NewsChannel).createWebhook( - 'Giveaway ping webhook' - ); + const webhook = await (message.channel as TextChannel | NewsChannel).createWebhook('Giveaway ping webhook'); webhookClient = new WebhookClient(webhook.id, webhook.token); } else { const webhook = webhooks.first(); |