aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush/giveawayping.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-26 21:53:35 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-26 21:53:35 -0400
commitcd0f853a2e4732cea5356f9ee3603bb804b0ab1f (patch)
treeac2f6ced46dfae7ca376e4dbd957d99a341d86a9 /src/commands/moulberry-bush/giveawayping.ts
parent0caccda67d97dd74405aa4ece5d3f07e7c7dfc66 (diff)
downloadtanzanite-cd0f853a2e4732cea5356f9ee3603bb804b0ab1f.tar.gz
tanzanite-cd0f853a2e4732cea5356f9ee3603bb804b0ab1f.tar.bz2
tanzanite-cd0f853a2e4732cea5356f9ee3603bb804b0ab1f.zip
made some more changes
Diffstat (limited to 'src/commands/moulberry-bush/giveawayping.ts')
-rw-r--r--src/commands/moulberry-bush/giveawayping.ts68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/commands/moulberry-bush/giveawayping.ts b/src/commands/moulberry-bush/giveawayping.ts
deleted file mode 100644
index e6fdd9a..0000000
--- a/src/commands/moulberry-bush/giveawayping.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { BushCommand } from '../../lib/extensions/BushCommand';
-import AllowedMentions from '../../lib/utils/AllowedMentions';
-import { Message, WebhookClient } from 'discord.js';
-import { TextChannel } from 'discord.js';
-import { NewsChannel } from 'discord.js';
-
-export default class GiveawayPingCommand extends BushCommand {
- constructor() {
- super('giveawayping', {
- aliases: ['giveawayping', 'giveawaypong'],
- category: "Moulberry's Bush",
- description: {
- content: 'Pings the giveaway role.',
- usage: 'giveawayping',
- examples: ['giveawayping']
- },
- clientPermissions: ['MANAGE_MESSAGES'],
- userPermissions: [
- 'SEND_MESSAGES',
- 'MANAGE_GUILD',
- 'MANAGE_MESSAGES',
- 'BAN_MEMBERS',
- 'KICK_MEMBERS',
- 'VIEW_CHANNEL'
- ],
- channel: 'guild',
- ignoreCooldown: [],
- ignorePermissions: [],
- cooldown: 1.44e7, //4 hours
- ratelimit: 1,
- editable: false
- });
- }
- 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 (
- !['767782084981817344', '833855738501267456'].includes(message.channel.id)
- )
- 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');
- webhookClient = new WebhookClient(webhook.id, webhook.token);
- } else {
- const webhook = webhooks.first();
- webhookClient = new WebhookClient(webhook.id, webhook.token);
- }
- return webhookClient.send(
- '🎉 <@&767782793261875210> Giveaway.\n\n<:mad:783046135392239626> Spamming, line breaking, gibberish etc. disqualifies you from winning. We can and will ban you from giveaways. Winners will all be checked and rerolled if needed.',
- {
- username: `${message.member.nickname || message.author.username}`,
- avatarURL: message.author.avatarURL({ dynamic: true }),
- allowedMentions: AllowedMentions.roles()
- }
- );
- }
-}