add message when nothing have been specified

This commit is contained in:
loicbersier 2018-10-12 10:56:30 +02:00
parent 542e5be326
commit e041712a2d
2 changed files with 4 additions and 0 deletions

View file

@ -26,6 +26,8 @@ module.exports = class BanCommand extends Command {
} }
async run(message, { member, reasons }) { async run(message, { member, reasons }) {
if(!reasons)
reasons = 'Nothing have been specified'
if(member.id === message.author.id) if(member.id === message.author.id)
return message.say("Why would you ban yourself ?") return message.say("Why would you ban yourself ?")
member.ban(reasons) member.ban(reasons)

View file

@ -26,6 +26,8 @@ module.exports = class KickCommand extends Command {
} }
async run(message, { member, reasons }) { async run(message, { member, reasons }) {
if(!reasons)
reasons = 'Nothing have been specified'
if(member.id === message.author.id) if(member.id === message.author.id)
return message.say("Why would you kick yourself ?") return message.say("Why would you kick yourself ?")
member.kick(reasons) member.kick(reasons)