mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Replace all sendMessage calls with send
This commit is contained in:
@@ -23,7 +23,7 @@ class MagicBall extends commando.Command {
|
||||
if(question === "") {
|
||||
question = "Not Specified."
|
||||
}
|
||||
message.channel.sendMessage("Question: " + question + "\n:8ball: " + coin + " :8ball:");
|
||||
message.channel.send("Question: " + question + "\n:8ball: " + coin + " :8ball:");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ class ChooseCommand extends commando.Command {
|
||||
let choice1 = " " + message.content.replace(choice2, "").split(" ").slice(1).join(" ");
|
||||
let coin = [choice1, choice2];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage("I choose" + coin.replace("|", ""));
|
||||
message.channel.send("I choose" + coin.replace("|", ""));
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Split your two choices with a ' | '!");
|
||||
message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class CoinFlipCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let coin = ['Heads', 'Tails'];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage("It landed on " + coin);
|
||||
message.channel.send("It landed on " + coin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class ComplimentCommand extends commando.Command {
|
||||
if(username === '') {
|
||||
message.reply(coin);
|
||||
} else {
|
||||
message.channel.sendMessage(username + ", " + coin);
|
||||
message.channel.send(username + ", " + coin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ class FishyCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let coin = [':fish:', ':tropical_fish:', ':blowfish:'];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage("You caught a: " + coin);
|
||||
message.channel.send("You caught a: " + coin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class FortuneCookieCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let fortunes = ["Do not seek so much to find the answer as much as to understand the question better.", "You will soon be honored by someone you respect.", "Happiness comes from a good life.", "You are contemplating some action which will bring credit upon you.", "Be prepared for extra energy.", "You are admired for your adventurous ways.", "The love of your life is sitting across from you.", "Beauty is simply beauty. Originality is magical.", "Never quit!", "Today is an ideal time to water your personal garden.", "Questions provide the key to unlocking our unlimited potential.", "Expect great things and great things will come.", "The Greatest War Sometimes Isn't On The Battlefield But Against Oneself.", "Become who you are.", "In case of fire, keep calm, pay bill and run.", "Anyone who dares to be, can never be weak.", "You broke my cookie!", "Dream lofty dreams, and as you dream, so shall you become.", "You've got what it takes, but it will take everything you've got!", "Trust your intuition.", "The wise are aware of their treasure, while fools follow their vanity.", "You will always have good luck in your personal affairs.", "You don't need talent to gain experience.", "All the preparation you've done will finally be paying off!", "Determination is the wake-up call to the human will.", "The most useless energy is trying to change what and who God so carefully created.", "You cannot become rich except by enriching others.", "Your happiness is intertwined with your outlook on life.", "Sing and rejoice, fortune is smiling on you.", "Well-arranged time is the surest sign of a well-arranged mind."];
|
||||
fortunes = fortunes[Math.floor(Math.random() * fortunes.length)];
|
||||
message.channel.sendMessage(fortunes);
|
||||
message.channel.send(fortunes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class MotivateCommand extends commando.Command {
|
||||
if(username === '') {
|
||||
message.reply(coin);
|
||||
} else {
|
||||
message.channel.sendMessage(username + ", " + coin);
|
||||
message.channel.send(username + ", " + coin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,11 @@ class RandomNameGen extends commando.Command {
|
||||
let randomfirstboth = [randomfirstmale, randomfirstfemale]
|
||||
randomfirstboth = randomfirstboth[Math.floor(Math.random() * randomfirstboth.length)];
|
||||
if(message.content.toLowerCase().split(" ").slice(1).includes("male")) {
|
||||
message.channel.sendMessage(randomfirstmale + " " + randomlast);
|
||||
message.channel.send(randomfirstmale + " " + randomlast);
|
||||
} else if(message.content.toLowerCase().split(" ").slice(1).includes("female")) {
|
||||
message.channel.sendMessage(randomfirstfemale + " " + randomlast);
|
||||
message.channel.send(randomfirstfemale + " " + randomlast);
|
||||
} else {
|
||||
message.channel.sendMessage(randomfirstboth + " " + randomlast);
|
||||
message.channel.send(randomfirstboth + " " + randomlast);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class OffspringCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let gender = ['boy', 'girl'];
|
||||
gender = gender[Math.floor(Math.random() * gender.length)];
|
||||
message.channel.sendMessage("It's a " + gender + "!");
|
||||
message.channel.send("It's a " + gender + "!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class QuantumCoin extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let qcoin = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null'];
|
||||
qcoin = qcoin[Math.floor(Math.random() * qcoin.length)];
|
||||
message.channel.sendMessage("It landed " + qcoin);
|
||||
message.channel.send("It landed " + qcoin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class RateWaifuCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
let percentage = Math.floor(Math.random() * 10) + 1;
|
||||
message.channel.sendMessage("I'd give " + username + " a " + percentage + "/10!");
|
||||
message.channel.send("I'd give " + username + " a " + percentage + "/10!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class RoastMeCommand extends commando.Command {
|
||||
if(username === '') {
|
||||
message.reply(coin);
|
||||
} else {
|
||||
message.channel.sendMessage(username + ", " + coin);
|
||||
message.channel.send(username + ", " + coin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,39 +21,39 @@ class RockPaperScissors extends commando.Command {
|
||||
let response = ['Paper', 'Rock', 'Scissors'];
|
||||
response = response[Math.floor(Math.random() * response.length)];
|
||||
if(rps === undefined) {
|
||||
message.channel.sendMessage(":x: Error! Your message contains nothing!");
|
||||
message.channel.send(":x: Error! Your message contains nothing!");
|
||||
} else if(rps.includes("rock")) {
|
||||
if(response === "Rock") {
|
||||
message.channel.sendMessage("Rock! Aw, it's a tie!");
|
||||
message.channel.send("Rock! Aw, it's a tie!");
|
||||
}
|
||||
if(response === "Paper") {
|
||||
message.channel.sendMessage("Paper! Yes! I win!");
|
||||
message.channel.send("Paper! Yes! I win!");
|
||||
}
|
||||
if(response === "Scissors") {
|
||||
message.channel.sendMessage("Scissors! Aw... I lose...");
|
||||
message.channel.send("Scissors! Aw... I lose...");
|
||||
}
|
||||
} else if(rps.includes("paper")) {
|
||||
if(response === "Rock") {
|
||||
message.channel.sendMessage("Rock! Aw... I lose...");
|
||||
message.channel.send("Rock! Aw... I lose...");
|
||||
}
|
||||
if(response === "Paper") {
|
||||
message.channel.sendMessage("Paper! Aw, it's a tie!");
|
||||
message.channel.send("Paper! Aw, it's a tie!");
|
||||
}
|
||||
if(response === "Scissors") {
|
||||
message.channel.sendMessage("Scissors! Yes! I win!");
|
||||
message.channel.send("Scissors! Yes! I win!");
|
||||
}
|
||||
} else if(rps.includes("scissors")) {
|
||||
if(response === "Rock") {
|
||||
message.channel.sendMessage("Rock! Yes! I win!");
|
||||
message.channel.send("Rock! Yes! I win!");
|
||||
}
|
||||
if(response === "Paper") {
|
||||
message.channel.sendMessage("Paper! Aw... I lose...");
|
||||
message.channel.send("Paper! Aw... I lose...");
|
||||
}
|
||||
if(response === "Scissors") {
|
||||
message.channel.sendMessage("Scissors! Aw, it's a tie!");
|
||||
message.channel.send("Scissors! Aw, it's a tie!");
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Your choice is not Rock, Paper, or Scissors!");
|
||||
message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@ class RollChooseCommand extends commando.Command {
|
||||
let [value] = message.content.split(" ").slice(1);
|
||||
if(value === undefined) {
|
||||
let roll = Math.floor(Math.random() * 6) + 1;
|
||||
message.channel.sendMessage("You rolled a " + roll)
|
||||
message.channel.send("You rolled a " + roll)
|
||||
} else if(value.match("^[0-9]+$")) {
|
||||
let roll = Math.floor(Math.random() * value) + 1;
|
||||
message.channel.sendMessage("You rolled a " + roll);
|
||||
message.channel.send("You rolled a " + roll);
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Your message either contains a number but the number is invalid, or the number is in the wrong place.\n:notepad_spiral: (Note: When using numbers such as 1,000, do not use a comma)");
|
||||
message.channel.send(":x: Error! Your message either contains a number but the number is invalid, or the number is in the wrong place.\n:notepad_spiral: (Note: When using numbers such as 1,000, do not use a comma)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ class RouletteCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if(message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(':x: Error! This is a DM!');
|
||||
message.channel.send(':x: Error! This is a DM!');
|
||||
} else {
|
||||
message.channel.sendMessage("I choose " + message.guild.members.random().displayName + "!");
|
||||
message.channel.send("I choose " + message.guild.members.random().displayName + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class ShipCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let ship = message.content.split(" ").slice(1).join(" ");
|
||||
let percentage = Math.floor(Math.random() * 100) + 1;
|
||||
message.channel.sendMessage("I'd give " + ship + " a " + percentage + "%!");
|
||||
message.channel.send("I'd give " + ship + " a " + percentage + "%!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ class SlotsCommand extends commando.Command {
|
||||
let slotThree = slotThing[Math.floor(Math.random() * slotThing.length)];
|
||||
let slotFour = slotThing[Math.floor(Math.random() * slotThing.length)];
|
||||
if(slotOne === slotTwo && slotOne === slotThree && slotOne === slotFour) {
|
||||
message.channel.sendMessage(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nWow! You won! Great job... er... luck!");
|
||||
message.channel.send(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nWow! You won! Great job... er... luck!");
|
||||
} else {
|
||||
message.channel.sendMessage(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nAww... You lost... Guess it's just bad luck, huh?");
|
||||
message.channel.send(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nAww... You lost... Guess it's just bad luck, huh?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class VocaloidSongRndm extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let coin = ["https://www.youtube.com/watch?v=ebAKoRcYFTA", "https://www.youtube.com/watch?v=Mqps4anhz0Q", "https://www.youtube.com/watch?v=AUEiHQOCQ2M", "https://www.youtube.com/watch?v=oyteTOBxRm8", "https://www.youtube.com/watch?v=uwwU55zBYlQ", "https://www.youtube.com/watch?v=sSYoz0JmnZo", "https://www.youtube.com/watch?v=NpU4dsXW6EI", "https://www.youtube.com/watch?v=MzyXD8bNbvk", "https://www.youtube.com/watch?v=hyV4qGAPKac", "https://www.youtube.com/watch?v=pywNi6gD1FA", "https://www.youtube.com/watch?v=17FEtaiWdVg", "https://www.youtube.com/watch?v=fmrA-gxJxgQ", "https://www.youtube.com/watch?v=yOBWgSPrYVA", "https://www.youtube.com/watch?v=nCaqf9WhqOY", "https://www.youtube.com/watch?v=cQKGUgOfD8U", "https://www.youtube.com/watch?v=sK92X82T3Sk", "https://www.youtube.com/watch?v=AH5_sKwDw1E", "https://www.youtube.com/watch?v=dw-KJNqcK-Q", "https://www.youtube.com/watch?v=X47JmmqbMvc", "https://www.youtube.com/watch?v=ojQPpYVQt7U", "https://www.amazon.com/Gogatsu-Yamai-feat-Kagamine-Len/dp/B00P1BG27S", "https://www.youtube.com/watch?v=N1-Z8uslIsI", "https://www.youtube.com/watch?v=EAgk-t2zzqw", "https://www.youtube.com/watch?v=uLBC2kWYFo8", "https://www.youtube.com/watch?v=OXHYIlkZLUU", "https://www.youtube.com/watch?v=ObIa9wXbyMQ", "https://www.youtube.com/watch?v=dGNoCICGmo0", "https://www.youtube.com/watch?v=LcoyEZkTKfY", "https://www.youtube.com/watch?v=mKHaW0qd5Mw", "https://www.youtube.com/watch?v=GG627DYk_E4", "https://www.youtube.com/watch?v=jTm6Q5Pj_Jo", "https://www.youtube.com/watch?v=TVeIDmk3rBo", "https://www.youtube.com/watch?v=1K3in6w9tt4", "https://www.youtube.com/watch?v=07r67gGbtLQ", "https://www.youtube.com/watch?v=243vPl8HdVk", "https://www.youtube.com/watch?v=zweVJrnE1uY", "https://www.youtube.com/watch?v=RKtoreimcQ8", "https://www.youtube.com/watch?v=Je6dCVfHvkU", "https://www.youtube.com/watch?v=UxFv12y_evM", "https://www.youtube.com/watch?v=2HegQtmJeto", "https://www.youtube.com/watch?v=8-Epnpruww0"];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage(coin);
|
||||
message.channel.send(coin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user