From 1063b7e3c25cdad964f7a6f0b32eb975ba947295 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 22 Mar 2017 00:56:37 +0000 Subject: [PATCH] Meme Fix --- commands/botinfo/contact.js | 10 ++++++++-- commands/imageedit/meme.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/commands/botinfo/contact.js b/commands/botinfo/contact.js index 99fd0217..784a69fe 100644 --- a/commands/botinfo/contact.js +++ b/commands/botinfo/contact.js @@ -1,5 +1,6 @@ const commando = require('discord.js-commando'); const banlist = require('./banlist.json'); +const config = require('../../config.json'); module.exports = class ContactCommand extends commando.Command { constructor(Client){ @@ -23,11 +24,16 @@ module.exports = class ContactCommand extends commando.Command { } console.log("[Command] " + message.content); let banID = message.author.id; + let messageToReport = message.content.split(" ").slice(1).join(" "); if (message.author.id === banlist.banned[banID]) { message.channel.send("Sorry, you've been banned from using this command."); } else { - this.client.users.get('242699360352206850').send("**" + message.author.username + '#' + message.author.discriminator + " (" + message.author.id + ")" + ":**\n" + message.content.split(" ").slice(1).join(" ")); - message.channel.send('Message Sent! Thanks for your support!'); + if(messageToReport === '') { + message.channel.send(':x: Error! Please do not report nothing!'); + } else { + this.client.users.get(config.owner).send("**" + message.author.username + '#' + message.author.discriminator + " (" + message.author.id + ")" + ":**\n" + messageToReport); + message.channel.send('Message Sent! Thanks for your support!'); + } } } }; \ No newline at end of file diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 1819decb..214897c9 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -25,7 +25,7 @@ module.exports = class MemeCommand extends commando.Command { message.channel.send("**Type Codes:** tenguy, afraid, older, aag, tried, biw, blb, kermit, bd, ch, cbg, wonka, cb, keanu, dsm, live, ants, doge, alwaysonbeat, ermg, facepalm, fwp, fa, fbf, fry, hipster, icanhas, crazypills, mw, noidea, regret, boat, hagrid, sohappy, captain, inigo, iw, ackbar, happening, joker, ive, ll, morpheus, mb, badchoice, mmm, jetpack, red, mordor, oprah, oag, remembers, philosoraptor, jw, patrick, rollsafe, sad-obama, sad-clinton, sadfrog, sad-bush, sad-biden, sad-boehner, saltbae, sarcasticbear, dwight, sb, ss, sf, dodgson, money, sohot, nice, awesome-awkward, awesome, awkward-awesome, awkward, fetch, success, scc, ski, officespace, interesting, toohigh, bs, center, both, winter, xy, buzz, yodawg, uno, yallgot, bad, elf, chosen"); } else if(message.content.includes("|")) { if(message.content.split(" ").slice(1).join(" ").match(/^[a-zA-Z0-9|.,!?'-\s]+$/)) { - let memeQuery = message.content.split(" ").slice(1).join("-").split('-|-'); + let memeQuery = message.content.split(" ").slice(2).join("-").split('-|-'); let toprow = memeQuery[0].split("?").join("~q"); let bottomrow = memeQuery[1].split("?").join("~q"); let link = "https://memegen.link/" + type + "/" + toprow + "/" + bottomrow + ".jpg";