Remove all useless async

This commit is contained in:
Daniel Odendahl Jr
2017-03-24 12:16:58 +00:00
parent 33b7d18d54
commit 0ce7eb3ee1
95 changed files with 287 additions and 287 deletions
+12 -12
View File
@@ -14,7 +14,7 @@ module.exports = class RockPaperScissors extends commando.Command {
});
}
async run(message) {
run(message) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
@@ -23,43 +23,43 @@ module.exports = class RockPaperScissors extends commando.Command {
let response = ['Paper', 'Rock', 'Scissors'];
response = response[Math.floor(Math.random() * response.length)];
if (!rps) {
message.channel.send(":x: Error! Your message contains nothing!");
return message.channel.send(":x: Error! Your message contains nothing!");
}
else if (rps.includes("rock")) {
if (response === "Rock") {
message.channel.send("Rock! Aw, it's a tie!");
return message.channel.send("Rock! Aw, it's a tie!");
}
if (response === "Paper") {
message.channel.send("Paper! Yes! I win!");
return message.channel.send("Paper! Yes! I win!");
}
if (response === "Scissors") {
message.channel.send("Scissors! Aw... I lose...");
return message.channel.send("Scissors! Aw... I lose...");
}
}
else if (rps.includes("paper")) {
if (response === "Rock") {
message.channel.send("Rock! Aw... I lose...");
return message.channel.send("Rock! Aw... I lose...");
}
if (response === "Paper") {
message.channel.send("Paper! Aw, it's a tie!");
return message.channel.send("Paper! Aw, it's a tie!");
}
if (response === "Scissors") {
message.channel.send("Scissors! Yes! I win!");
return message.channel.send("Scissors! Yes! I win!");
}
}
else if (rps.includes("scissors")) {
if (response === "Rock") {
message.channel.send("Rock! Yes! I win!");
return message.channel.send("Rock! Yes! I win!");
}
if (response === "Paper") {
message.channel.send("Paper! Aw... I lose...");
return message.channel.send("Paper! Aw... I lose...");
}
if (response === "Scissors") {
message.channel.send("Scissors! Aw, it's a tie!");
return message.channel.send("Scissors! Aw, it's a tie!");
}
}
else {
message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
return message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
}
}
};