diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index d3c7318a..c74abaf8 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -1,102 +1,6 @@ const commando = require('discord.js-commando'); -const memecodes = { - "tenguy": "tenguy", - "afraid": "afraid", - "older": "older", - "aag": "aag", - "tried": "tried", - "biw": "biw", - "blb": "blb", - "kermit": "kermit", - "bd": "bd", - "ch": "ch", - "cbg": "cbg", - "wonka": "wonka", - "cb": "cb", - "keanu": "keanu", - "dsm": "dsm", - "live": "live", - "ants": "ants", - "doge": "doge", - "alwaysonbeat": "alwaysonbeat", - "ermg": "ermg", - "facepalm": "facepalm", - "fwp": "fwp", - "fa": "fa", - "fbf": "fbf", - "fry": "fry", - "hipster": "hipster", - "icanhas": "icanhas", - "crazypills": "crazypills", - "mw": "mw", - "noidea": "noidea", - "regret": "regret", - "boat": "boat", - "hagrid": "hagrid", - "sohappy": "sohappy", - "captain": "captain", - "inigo": "inigo", - "iw": "iw", - "ackbar": "ackbar", - "happening": "happening", - "joker": "joker", - "ive": "ive", - "ll": "ll", - "morpheus": "morpheus", - "mb": "mb", - "badchoice": "badchoice", - "mmm": "mmm", - "jetpack": "jetpack", - "red": "red", - "mordor": "mordor", - "oprah": "oprah", - "oag": "oag", - "remembers": "remembers", - "philosoraptor": "philosoraptor", - "jw": "jw", - "patrick": "patrick", - "rollsafe": "rollsafe", - "sad-obama": "sad-obama", - "sad-clinton": "sad-clinton", - "sadfrog": "sadfrog", - "sad-bush": "sad-bush", - "sad-biden": "sad-biden", - "sad-boehner": "sad-boehner", - "saltbae": "saltbae", - "sarcasticbear": "sarcasticbear", - "dwight": "dwight", - "sb": "sb", - "ss": "ss", - "sf": "sf", - "dodgson": "dodgson", - "money": "money", - "sohot": "sohot", - "nice": "nice", - "awesome-awkward": "awesome-awkward", - "awesome": "awesome", - "awkward-awesome": "awkward-awesome", - "awkward": "awkward", - "fetch": "fetch", - "success": "success", - "scc": "scc", - "ski": "ski", - "officespace": "officespace", - "interesting": "interesting", - "toohigh": "toohigh", - "bs": "bs", - "center": "center", - "both": "both", - "winter": "winter", - "xy": "xy", - "buzz": "buzz", - "yodawg": "yodawg", - "uno": "uno", - "yallgot": "yallgot", - "bad": "bad", - "elf": "elf", - "chosen": "chosen" -}; +const memecodes = ['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']; module.exports = class MemeCommand extends commando.Command { constructor(Client) { @@ -115,7 +19,7 @@ module.exports = class MemeCommand extends commando.Command { prompt: 'What meme type do you want to use?', type: 'string', validate: type => { - if (memecodes[type.toLowerCase()]) { + if (memecodes.some(memeArray => type.toLowerCase() === memeArray)) { return true; } return 'Please enter a valid meme type. Use `;help meme` to view a list of types.'; diff --git a/index.js b/index.js index 95b5f459..f4b7c896 100644 --- a/index.js +++ b/index.js @@ -142,8 +142,6 @@ client.once('ready', () => { client.user.setGame(";help | dragonfire535"); }); -process.on('unhandledRejection', function(reason, p) { - console.log(`[Error] A Possibly Unhandled Rejection has Occurred. ${reason}`); -}); +process.on('unhandledRejection', console.error); client.login(config.token);