Meme Command Update

This commit is contained in:
dragonfire535
2017-03-07 20:42:40 -05:00
parent 42d3545120
commit 70133c54d8
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ class InfoCommand extends commando.Command {
.addField('Modules',
"[Commando](https://github.com/Gawdl3y/discord.js-commando) (0.9.0), [cleverbot-node](https://github.com/fojas/cleverbot-node) (0.3.5), [pirate-speak](https://github.com/mikewesthad/pirate-speak) (1.0.1), [JIMP](https://github.com/oliver-moran/jimp) (0.2.27), [google-translate-api](https://github.com/matheuss/google-translate-api) (2.2.2), [urban](https://github.com/mvrilo/urban) (0.3.1), [zalgoize](https://github.com/clux/zalgolize) (1.2.4), [hepburn](https://github.com/lovell/hepburn) (1.0.0), [wikifakt](https://github.com/coffee-cup/wikifakt) (1.0.3), [yahoo-weather](https://github.com/mamal72/node-yahoo-weather) (2.2.2), [imdb-api](https://github.com/worr/node-imdb-api) (2.2.1), [request-promise](https://github.com/request/request-promise) (4.1.1)")
.addField('Other Credit',
"[Cleverbot API](https://www.cleverbot.com/api/), [Wattpad API](https://developer.wattpad.com/docs/api), [Wordnik API](http://developer.wordnik.com/docs.html), [osu! API](https://osu.ppy.sh/p/api)")
"[Cleverbot API](https://www.cleverbot.com/api/), [Wattpad API](https://developer.wattpad.com/docs/api), [Wordnik API](http://developer.wordnik.com/docs.html), [osu! API](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/)")
.addField('My Server',
"[Click Here to Join!](https://discord.gg/fqQF8mc)")
.addField('Invite Link:',
+4 -2
View File
@@ -23,10 +23,12 @@ class MemeCommand extends commando.Command {
if(type === "list") {
message.channel.sendMessage("**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]+$/)) {
if(message.content.split(" ").slice(1).join(" ").match(/^[a-zA-Z0-9|.,!?\s]+$/)) {
let bottomrow = message.content.toLowerCase().split("|").slice(1).join("-");
let toprow = " " + message.content.toLowerCase().replace(bottomrow, "").split(" ").slice(2).join("-");
toprow = toprow.replace("|", "");
bottomrow = bottomrow.replace("?", "~q");
toprow = toprow.replace("?", "~q");
let link = "https://memegen.link/" + type + "/" + toprow + "/" + bottomrow + ".jpg";
if(type !== "") {
if(memecodes.memecodes[type]) {
@@ -38,7 +40,7 @@ class MemeCommand extends commando.Command {
message.channel.sendMessage(":x: Error! No meme type set! (View list with ;meme list)");
}
} else {
message.channel.sendMessage(":x: Error! Only Letters and Numbers are allowed!");
message.channel.sendMessage(":x: Error! Only letters, numbers, periods, commas, exclamation points, and question marks are allowed!");
}
} else {
message.channel.sendMessage(":x: Split your two choices with a ' | '!");