diff --git a/bot.js b/bot.js index 5e0a517..fe13745 100644 --- a/bot.js +++ b/bot.js @@ -444,6 +444,11 @@ async function ban(message) { const member = members.array()[0]; + if (member === message.member) { + message.reply("you can't ban yourself!"); + return; + } + let verificationEmbed = new Discord.MessageEmbed() .setTitle(`Are you sure you would like to ban \`${member.user.tag}\`?`) .setAuthor(member.user.tag, member.user.avatarURL()) @@ -501,6 +506,12 @@ async function kick(message) { const member = members.array()[0]; + if (member === message.member) { + message.reply("you can't ban yourself!"); + return; + } + + const verificationEmbed = new Discord.MessageEmbed() .setTitle(`Are you sure you would like to kick \`${member.user.tag}\`?`) .setDescription("React to this message to verify")