mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Replace all sendMessage calls with send
This commit is contained in:
@@ -17,7 +17,7 @@ class CanYouNot extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage('Can YOU not?');
|
||||
message.channel.send('Can YOU not?');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class GiveFlowerCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
message.channel.send('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ class LotteryCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let lotterynumber = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
if(lotterynumber === "Winner") {
|
||||
message.channel.sendMessage("Wow " + message.author.username + "! You actually won! Great job!");
|
||||
message.channel.send("Wow " + message.author.username + "! You actually won! Great job!");
|
||||
} else {
|
||||
message.channel.sendMessage("Nope, sorry, " + message.author.username + ", you lost. RIP you.");
|
||||
message.channel.send("Nope, sorry, " + message.author.username + ", you lost. RIP you.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class MathGameCommand extends commando.Command {
|
||||
let randomExpression = randomValue1 + randomType + randomValue2;
|
||||
let solved = math.eval(randomExpression);
|
||||
if(randomValue === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle('You have **ten** seconds to answer:')
|
||||
@@ -54,9 +54,9 @@ class MathGameCommand extends commando.Command {
|
||||
time: 10000,
|
||||
errors: ['time'],
|
||||
}).then((collected) => {
|
||||
message.channel.sendMessage(`Good Job! You won!`);
|
||||
message.channel.send(`Good Job! You won!`);
|
||||
}).catch(() => {
|
||||
message.channel.sendMessage('Aw... Too bad, try again next time! The correct answer was: ' + solved);
|
||||
message.channel.send('Aw... Too bad, try again next time! The correct answer was: ' + solved);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class SlowClapCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage('*slow clap*');
|
||||
message.channel.send('*slow clap*');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class SpamCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage("Spam!");
|
||||
message.channel.send("Spam!");
|
||||
message.channel.sendFile("./images/Spam.jpg");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class TodayCommand extends commando.Command {
|
||||
.setDescription(response.data.Events[randomNumber].text + ' (' + response.data.Events[randomNumber].year + ')');
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Something went wrong!");
|
||||
message.channel.send(":x: Error! Something went wrong!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class TypingGameCommand extends commando.Command {
|
||||
break;
|
||||
}
|
||||
if(time === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle('You have **' + levelWord + '** seconds to type:')
|
||||
@@ -64,9 +64,9 @@ class TypingGameCommand extends commando.Command {
|
||||
time: time,
|
||||
errors: ['time'],
|
||||
}).then((collected) => {
|
||||
message.channel.sendMessage(`Good Job! You won!`);
|
||||
message.channel.send(`Good Job! You won!`);
|
||||
}).catch(() => {
|
||||
message.channel.sendMessage('Aw... Too bad, try again next time!');
|
||||
message.channel.send('Aw... Too bad, try again next time!');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user