Fix the bot being able to remove itself, also fixed typo

This commit is contained in:
Isaac (eartharoid) 2020-09-07 09:50:31 +01:00
parent 62c099bf8a
commit 97524f2c15

View File

@ -68,7 +68,7 @@ module.exports = {
let member = guild.member(message.mentions.users.first() || guild.members.cache.get(args[0])); let member = guild.member(message.mentions.users.first() || guild.members.cache.get(args[0]));
if(!member) if(!member || member.id === guild.me.id)
return message.channel.send( return message.channel.send(
new MessageEmbed() new MessageEmbed()
.setColor(config.err_colour) .setColor(config.err_colour)
@ -93,7 +93,7 @@ module.exports = {
new MessageEmbed() new MessageEmbed()
.setColor(config.colour) .setColor(config.colour)
.setAuthor(member.user.username, member.user.displayAvatarURL()) .setAuthor(member.user.username, member.user.displayAvatarURL())
.setTitle('**Member remove**') .setTitle('**Member removed**')
.setDescription(`${member} has been removed by ${message.author}`) .setDescription(`${member} has been removed by ${message.author}`)
.setFooter(guild.name, guild.iconURL()) .setFooter(guild.name, guild.iconURL())
); );
@ -113,6 +113,5 @@ module.exports = {
} catch (error) { } catch (error) {
log.error(error); log.error(error);
} }
// command ends here
}, },
}; };