Removed useless thing

This commit is contained in:
Loic Bersier 2018-09-28 16:16:35 +02:00
parent 8f12d5f9a1
commit b1e23b47dd
6 changed files with 6 additions and 16 deletions

View file

@ -20,9 +20,8 @@ module.exports = class BanCommand extends Command {
} }
async run(message, { member }) { async run(message, { member }) {
if(member.id === message.author.id) { if(member.id === message.author.id)
message.say("Why would you ban yourself ?") return message.say("Why would you ban yourself ?")
} else
member.ban() member.ban()
.then(() => message.reply(`${member.user.username} was succesfully banned.`)); .then(() => message.reply(`${member.user.username} was succesfully banned.`));
}; };

View file

@ -20,9 +20,8 @@ module.exports = class KickCommand extends Command {
} }
async run(message, { member }) { async run(message, { member }) {
if(member.id === message.author.id) { if(member.id === message.author.id)
message.say("Why would you kick yourself ?") return message.say("Why would you kick yourself ?")
} else
member.kick() member.kick()
.then(() => message.reply(`${member.user.username} was succesfully kicked.`)); .then(() => message.reply(`${member.user.username} was succesfully kicked.`));
}; };

View file

@ -21,9 +21,8 @@ module.exports = class emoteSayCommand extends Command {
message.delete(); message.delete();
text.toLowerCase().split('') text.toLowerCase().split('')
let emojiArray = []; let emojiArray = [];
for (let i = 0; i < text.length; i++) { for (let i = 0; i < text.length; i++)
emojiArray[i] = emojiCharacters[text[i]]; emojiArray[i] = emojiCharacters[text[i]];
}
message.say(emojiArray.join("")) message.say(emojiArray.join(""))

View file

@ -13,9 +13,6 @@ module.exports = class RandoCatCommand extends Command {
async run(message, { city }) { async run(message, { city }) {
const { body } = await snekfetch.get(`http://aws.random.cat/meow`); const { body } = await snekfetch.get(`http://aws.random.cat/meow`);
if (body.cod == '404') {
return message.say(`No results found for **${city}**`);
}
const dogEmbed = new Discord.RichEmbed() const dogEmbed = new Discord.RichEmbed()
.setColor("#ff9900") .setColor("#ff9900")
.setTitle('Meow') .setTitle('Meow')

View file

@ -13,9 +13,6 @@ module.exports = class RandoDogCommand extends Command {
async run(message, { city }) { async run(message, { city }) {
const { body } = await snekfetch.get(`https://random.dog/woof.json`); const { body } = await snekfetch.get(`https://random.dog/woof.json`);
if (body.cod == '404') {
return message.say(`No results found for **${city}**`);
}
const dogEmbed = new Discord.RichEmbed() const dogEmbed = new Discord.RichEmbed()
.setColor("#ff9900") .setColor("#ff9900")
.setTitle('Woof') .setTitle('Woof')

View file

@ -10,9 +10,8 @@ module.exports = class AvatarCommand extends Command {
} }
async run(message) { async run(message) {
if (!message.mentions.users.size) { if (!message.mentions.users.size)
return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`); return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`);
}
const avatarList = message.mentions.users.map(user => { const avatarList = message.mentions.users.map(user => {
return `${user.username}'s avatar: ${user.displayAvatarURL}`; return `${user.username}'s avatar: ${user.displayAvatarURL}`;