mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
Fix the bot being able to remove itself, also fixed typo
This commit is contained in:
parent
62c099bf8a
commit
97524f2c15
@ -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
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user