Replace all sendMessage calls with send

This commit is contained in:
dragonfire535
2017-03-15 20:59:46 -04:00
parent 7faa8c3190
commit dfc9583d99
87 changed files with 174 additions and 174 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class BinaryCommand extends commando.Command {
}
console.log("[Command] " + message.content);
let turnToBinary = message.content.split(" ").slice(1).join(" ");
message.channel.sendMessage(stringToBinary(turnToBinary)).catch(error => message.channel.sendMessage(':x: Error! Translation is too long, or nothing was entered!'));
message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
}
}
+2 -2
View File
@@ -19,7 +19,7 @@ class CowsayCommand extends commando.Command {
}
console.log("[Command] " + message.content);
if(message.content.split(" ").slice(1).join(" ") === "") {
message.channel.sendMessage(":x: Error! You entered nothing!");
message.channel.send(":x: Error! You entered nothing!");
} else {
let turnToCowsay = message.content.split(" ").slice(1).join(" ");
message.channel.sendCode(null, cowsay.say({
@@ -27,7 +27,7 @@ class CowsayCommand extends commando.Command {
e : "oO",
T : "U "
})).catch(error => {
message.channel.sendMessage(':x: Error! Perhaps the content is too long?');
message.channel.send(':x: Error! Perhaps the content is too long?');
});
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ class EmbedCommand extends commando.Command {
console.log("[Command] " + message.content);
let embedmessage = message.content.split(" ").slice(1).join(" ");
if(embedmessage === "") {
message.channel.sendMessage(":x: Error! Nothing to embed!");
message.channel.send(":x: Error! Nothing to embed!");
} else {
const embed = new Discord.RichEmbed()
.setAuthor(message.author.username, message.author.avatarURL)
+3 -3
View File
@@ -21,12 +21,12 @@ class PirateCommand extends commando.Command {
let messagecontent = message.content.split(" ").slice(1).join(" ");
let pirate = pirateSpeak.translate(messagecontent);
if(messagecontent === "") {
message.channel.sendMessage(":x: Error! Nothing to translate!");
message.channel.send(":x: Error! Nothing to translate!");
} else {
if(pirate.length > 1950) {
message.channel.sendMessage(":x: Error! Your message is too long!");
message.channel.send(":x: Error! Your message is too long!");
} else {
message.channel.sendMessage(pirate);
message.channel.send(pirate);
}
}
}
+2 -2
View File
@@ -22,10 +22,10 @@ class ReverseCommand extends commando.Command {
}
let messagecontent = message.content.split(" ").slice(1).join(" ");
if(messagecontent === "") {
message.channel.sendMessage(":x: Error! Nothing to reverse!");
message.channel.send(":x: Error! Nothing to reverse!");
} else {
let reversed = reverseString(messagecontent);
message.channel.sendMessage(reversed);
message.channel.send(reversed);
}
}
}
+3 -3
View File
@@ -22,12 +22,12 @@ class RomajiCommand extends commando.Command {
if(hepburn.containsKana(romajify)) {
let romajified = hepburn.fromKana(romajify);
if(romajified.length > 1950) {
message.channel.sendMessage(":x: Error! Your message is too long!");
message.channel.send(":x: Error! Your message is too long!");
} else {
message.channel.sendMessage(romajified);
message.channel.send(romajified);
}
} else {
message.channel.sendMessage(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
message.channel.send(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
}
}
}
+2 -2
View File
@@ -19,9 +19,9 @@ class SayCommand extends commando.Command {
console.log("[Command] " + message.content);
let Copycat = message.content.split(" ").slice(1).join(" ");
if(Copycat === "") {
message.channel.sendMessage(":x: Error! Nothing to say!");
message.channel.send(":x: Error! Nothing to say!");
} else {
message.channel.sendMessage(Copycat);
message.channel.send(Copycat);
if (message.channel.type === 'dm') return;
message.delete();
}
+2 -2
View File
@@ -30,9 +30,9 @@ class ShuffleCommand extends commando.Command {
}
let shuffled = message.content.split(" ").slice(1).join(" ");
if(shuffled === '') {
message.channel.sendMessage(":x: Error! Nothing to shuffle!");
message.channel.send(":x: Error! Nothing to shuffle!");
} else {
message.channel.sendMessage(shuffled.shuffle());
message.channel.send(shuffled.shuffle());
}
}
}
+5 -5
View File
@@ -24,12 +24,12 @@ class TranslateCommand extends commando.Command {
let [languageto] = message.content.toLowerCase().split(" ").slice(1);
let messagecontent = message.content.split(" ").slice(2).join(" ");
if(languageto === "list") {
message.channel.sendMessage("af': 'Afrikaans\nsq': 'Albanian'\n'ar': 'Arabic\nhy': 'Armenian\naz': 'Azerbaijani\neu': 'Basque\nbe': 'Belarusian\nbn': 'Bengali\nbs': 'Bosnian\nbg': 'Bulgarian\nca': 'Catalan\nceb': 'Cebuano\nny': 'Chichewa\nzh-cn': 'Chinese Simplified\nzh-tw': 'Chinese Traditional\nco': 'Corsican\nhr': 'Croatian\ncs': 'Czech\nda': 'Danish\nnl': 'Dutch\nen': 'English\neo': 'Esperanto\net': 'Estonian\ntl': 'Filipino\nfi': 'Finnish\nfr': 'French\nfy': 'Frisian\ngl': 'Galician\nka': 'Georgian\nde': 'German\nel': 'Greek\ngu': 'Gujarati\nht': 'Haitian Creole\nha': 'Hausa\nhaw': 'Hawaiian\niw': 'Hebrew\nhi': 'Hindi\nhmn': 'Hmong\nhu': 'Hungarian\nis': 'Icelandic\nig': 'Igbo\nid': 'Indonesian\nga': 'Irish\nit': 'Italian\nja': 'Japanese\njw': 'Javanese\nkn': 'Kannada\nkk': 'Kazakh\nkm': 'Khmer\nko': 'Korean\nku': 'Kurdish (Kurmanji)\nky': 'Kyrgyz\nlo': 'Lao\nla': 'Latin\nlv': 'Latvian\nlt': 'Lithuanian\nlb': 'Luxembourgish\nmk': 'Macedonian\nmg': 'Malagasy\nms': 'Malay\nml': 'Malayalam\nmt': 'Maltese\nmi': 'Maori\nmr': 'Marathi\nmn': 'Mongolian\nmy': 'Myanmar (Burmese)\nne': 'Nepali\nno': 'Norwegian\nps': 'Pashto\nfa': 'Persian\npl': 'Polish\npt': 'Portuguese\nma': 'Punjabi\nro': 'Romanian\nru': 'Russian\nsm': 'Samoan\ngd': 'Scots Gaelic\nsr': 'Serbian\nst': 'Sesotho\nsn': 'Shona\nsd': 'Sindhi\nsi': 'Sinhala\nsk': 'Slovak\nsl': 'Slovenian\nso': 'Somali\nes': 'Spanish\nsu': 'Sudanese\nsw': 'Swahili\nsv': 'Swedish\ntg': 'Tajik\nta': 'Tamil\nte': 'Telugu\nth': 'Thai\ntr': 'Turkish\nuk': 'Ukrainian\nur': 'Urdu\nuz': 'Uzbek\nvi': 'Vietnamese\ncy': 'Welsh\nxh': 'Xhosa\nyi': 'Yiddish\nyo': 'Yoruba\nzu': 'Zulu'");
message.channel.send("af': 'Afrikaans\nsq': 'Albanian'\n'ar': 'Arabic\nhy': 'Armenian\naz': 'Azerbaijani\neu': 'Basque\nbe': 'Belarusian\nbn': 'Bengali\nbs': 'Bosnian\nbg': 'Bulgarian\nca': 'Catalan\nceb': 'Cebuano\nny': 'Chichewa\nzh-cn': 'Chinese Simplified\nzh-tw': 'Chinese Traditional\nco': 'Corsican\nhr': 'Croatian\ncs': 'Czech\nda': 'Danish\nnl': 'Dutch\nen': 'English\neo': 'Esperanto\net': 'Estonian\ntl': 'Filipino\nfi': 'Finnish\nfr': 'French\nfy': 'Frisian\ngl': 'Galician\nka': 'Georgian\nde': 'German\nel': 'Greek\ngu': 'Gujarati\nht': 'Haitian Creole\nha': 'Hausa\nhaw': 'Hawaiian\niw': 'Hebrew\nhi': 'Hindi\nhmn': 'Hmong\nhu': 'Hungarian\nis': 'Icelandic\nig': 'Igbo\nid': 'Indonesian\nga': 'Irish\nit': 'Italian\nja': 'Japanese\njw': 'Javanese\nkn': 'Kannada\nkk': 'Kazakh\nkm': 'Khmer\nko': 'Korean\nku': 'Kurdish (Kurmanji)\nky': 'Kyrgyz\nlo': 'Lao\nla': 'Latin\nlv': 'Latvian\nlt': 'Lithuanian\nlb': 'Luxembourgish\nmk': 'Macedonian\nmg': 'Malagasy\nms': 'Malay\nml': 'Malayalam\nmt': 'Maltese\nmi': 'Maori\nmr': 'Marathi\nmn': 'Mongolian\nmy': 'Myanmar (Burmese)\nne': 'Nepali\nno': 'Norwegian\nps': 'Pashto\nfa': 'Persian\npl': 'Polish\npt': 'Portuguese\nma': 'Punjabi\nro': 'Romanian\nru': 'Russian\nsm': 'Samoan\ngd': 'Scots Gaelic\nsr': 'Serbian\nst': 'Sesotho\nsn': 'Shona\nsd': 'Sindhi\nsi': 'Sinhala\nsk': 'Slovak\nsl': 'Slovenian\nso': 'Somali\nes': 'Spanish\nsu': 'Sudanese\nsw': 'Swahili\nsv': 'Swedish\ntg': 'Tajik\nta': 'Tamil\nte': 'Telugu\nth': 'Thai\ntr': 'Turkish\nuk': 'Ukrainian\nur': 'Urdu\nuz': 'Uzbek\nvi': 'Vietnamese\ncy': 'Welsh\nxh': 'Xhosa\nyi': 'Yiddish\nyo': 'Yoruba\nzu': 'Zulu'");
} else if(languages.entries[languageto]) {
if(messagecontent === "") {
message.channel.sendMessage(":x: Error! Nothing to translate!");
message.channel.send(":x: Error! Nothing to translate!");
} else if(messagecontent.length > 200) {
message.channel.sendMessage(":x: Error! Please keep translations below 200 characters!");
message.channel.send(":x: Error! Please keep translations below 200 characters!");
} else {
translate(messagecontent, {to: languageto}).then(res => {
let languagefrom = res.from.language.iso.toLowerCase();
@@ -41,11 +41,11 @@ class TranslateCommand extends commando.Command {
res.text);
message.channel.sendEmbed(embed).catch(console.error);
}).catch(err => {
message.channel.sendMessage(":x: Error!");
message.channel.send(":x: Error!");
});
}
} else {
message.channel.sendMessage(":x: Error! Language not found!");
message.channel.send(":x: Error! Language not found!");
}
}
}
+4 -4
View File
@@ -21,7 +21,7 @@ class YodaCommand extends commando.Command {
console.log("[Command] " + message.content);
let yodaspeak = message.content.split(" ").slice(1).join(" ");
if(yodaspeak === "") {
message.channel.sendMessage(':x: Error! Nothing to translate!');
message.channel.send(':x: Error! Nothing to translate!');
} else {
const options = {
method: 'GET',
@@ -37,12 +37,12 @@ class YodaCommand extends commando.Command {
}
request(options).then(function (response) {
if(response === undefined) {
message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.');
message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
} else {
message.channel.sendMessage(response).catch(error => message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
message.channel.send(response).catch(error => message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
}
}).catch(function (err) {
message.channel.sendMessage(":x: Error! Unknown Error. Try again later!");
message.channel.send(":x: Error! Unknown Error. Try again later!");
});
}
}
+3 -3
View File
@@ -20,11 +20,11 @@ class ZalgoCommand extends commando.Command {
console.log("[Command] " + message.content);
let zalgoified = zalgo(message.content.split(" ").slice(1).join(" "));
if(zalgoified === '') {
message.channel.sendMessage(":x: Error! Nothing to zalgoify!");
message.channel.send(":x: Error! Nothing to zalgoify!");
} else if(zalgoified.length > 1950) {
message.channel.sendMessage(":x: Error! Your message is too long!");
message.channel.send(":x: Error! Your message is too long!");
} else {
message.channel.sendMessage(zalgoified);
message.channel.send(zalgoified);
}
}
}