Put reason in audit log

This commit is contained in:
loicbersier 2019-08-30 22:11:10 +02:00
parent 7380224fa4
commit d86f89e01b
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ class BanCommand extends Command {
await member.send(`https://youtu.be/55-mHgUjZfY\nYou have been banned from **${message.guild.name}** for the following reasons: "**${reasons}**"`)
.catch(() => console.log('could not send message to the concerned user'));
return member.ban(`Banned by : ${message.author.username} for the following reasons : ${reasons}`)
return member.ban({reason: `Banned by : ${message.author.username} for the following reasons : ${reasons}`})
.then(() => message.reply(`${member.user.username} was succesfully banned with the following reasons "${reasons}".`));
}
}

View file

@ -48,7 +48,7 @@ class KickCommand extends Command {
await member.send(`You have been kicked from **${message.guild.name}** for the following reasons: "**${reasons}**"`)
.catch(() => console.log('could not send message to the concerned user'));
return member.kick(`Kicked by : ${message.author.username} for the following reasons: ${reasons}`)
return member.kick({reason: `Kicked by : ${message.author.username} for the following reasons: ${reasons}`})
.then(() => message.reply(`${member.user.username} was succesfully kicked with the following reasons "${reasons}".`))
.catch(err => console.error(err));
}