From 142c49557a47cb7e584fb804d1d59d5c75c5b29a Mon Sep 17 00:00:00 2001 From: Supositware Date: Fri, 15 Mar 2019 18:04:25 +0100 Subject: [PATCH] Accidently pushed that --- event/listeners/messageReactionAdd.js | 12 ------------ package.json | 1 - 2 files changed, 13 deletions(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index c5276a64..8504f68e 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -1,7 +1,6 @@ const { Listener } = require('discord-akairo'); const { MessageEmbed } = require('discord.js'); const reload = require('auto-reload'); -const getUrls = require('get-urls'); let messageID = require('../../json/starboard.json'); class MessageReactionAddListener extends Listener { @@ -15,7 +14,6 @@ class MessageReactionAddListener extends Listener { async exec(reaction) { let messageContent = reaction.message.content; let messageAttachments = reaction.message.attachments.map(u=> `${u.url}`); - let URL = [...getUrls(messageContent)]; let starboardChannel; let staremote; @@ -51,11 +49,6 @@ class MessageReactionAddListener extends Listener { .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .setTimestamp(); - if (URL) { - return channel.send(`in: ${reaction.message.channel}\nhttps://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}`, {files: [URL[0]]}) - .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}\n${URL[0]}`)); - } - return channel.send(`in: ${reaction.message.channel}`, {files: messageAttachments, embed: starEmbed}) .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}`, { embed: starEmbed})); } @@ -94,11 +87,6 @@ class MessageReactionAddListener extends Listener { .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .setTimestamp(); - if (URL) { - return channel.send(`in: ${reaction.message.channel}\nhttps://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}`, {files: [URL[0]]}) - .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}\n${URL[0]}`)); - } - return channel.send(`in: ${reaction.message.channel}`,{files: messageAttachments, embed: shameEmbed}) .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}`, { embed: shameEmbed})); } diff --git a/package.json b/package.json index 0f205823..5fd90b82 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "discord-akairo": "github:1Computer1/discord-akairo#master", "discord.js": "github:discordjs/discord.js#master", "fpcalc": "^1.3.0", - "get-urls": "^9.0.0", "handbrake-js": "^3.0.8", "leo-profanity": "^1.2.4", "mkdirp": "^0.5.1",