mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Replace all sendMessage calls with send
This commit is contained in:
@@ -21,7 +21,7 @@ class MemeCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let [type] = message.content.toLowerCase().split(" ").slice(1);
|
||||
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");
|
||||
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 bottomrow = message.content.toLowerCase().split("|").slice(1).join("-");
|
||||
@@ -31,21 +31,21 @@ class MemeCommand extends commando.Command {
|
||||
toprow = toprow.replace("?", "~q");
|
||||
let link = "https://memegen.link/" + type + "/" + toprow + "/" + bottomrow + ".jpg";
|
||||
if(bottomrow.length > 100) {
|
||||
message.channel.sendMessage(":x: Error! Bottom text is over 100 characters!");
|
||||
message.channel.send(":x: Error! Bottom text is over 100 characters!");
|
||||
} else if(toprow.length > 100) {
|
||||
message.channel.sendMessage(":x: Error! Top text is over 100 characters!");
|
||||
message.channel.send(":x: Error! Top text is over 100 characters!");
|
||||
} else {
|
||||
if(memecodes.memecodes[type]) {
|
||||
message.channel.sendFile(link).catch(error => message.channel.sendMessage(":x: An Error Occurred! Please try again later!"));
|
||||
message.channel.sendFile(link).catch(error => message.channel.send(":x: An Error Occurred! Please try again later!"));
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Meme type not found! (View list with ;meme list)");
|
||||
message.channel.send(":x: Error! Meme type not found! (View list with ;meme list)");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Only letters, numbers, periods, commas, apostrophes, exclamation points, and question marks are allowed!");
|
||||
message.channel.send(":x: Error! Only letters, numbers, periods, commas, apostrophes, exclamation points, and question marks are allowed!");
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Split your two choices with a ' | '!");
|
||||
message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user