From b3cf4b771056ab7161610e47119025b5608fb271 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:45:56 +0700 Subject: [PATCH] Update MessageCreate.js --- src/client/actions/MessageCreate.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/client/actions/MessageCreate.js b/src/client/actions/MessageCreate.js index a7578f9..894886e 100644 --- a/src/client/actions/MessageCreate.js +++ b/src/client/actions/MessageCreate.js @@ -6,17 +6,6 @@ const { Events } = require('../../util/Constants'); let deprecationEmitted = false; -async function autoRedeemNitro(client, message) { - if (!message.content) return; - const allLinks = - message.content.match(/(discord.gift|discord.com|discordapp.com\/gifts)\/(\w{16,25})/gm) || - message.content.match(/(discord\.gift\/|discord\.com\/gifts\/|discordapp\.com\/gifts\/)(\w+)/gm); - if (!allLinks) return; - for (const link of allLinks) { - await client.redeemNitro(link, message.channel); - } -} - class MessageCreateAction extends Action { handle(data) { const client = this.client; @@ -29,10 +18,6 @@ class MessageCreateAction extends Action { const message = channel.messages._add(data); channel.lastMessageId = data.id; - if (client.options.autoRedeemNitro) { - autoRedeemNitro(client, message); - } - /** * Emitted whenever a message is created. * @event Client#messageCreate