From d86f89e01b6e6456a0adf3d4a8d890ab22412a12 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 30 Aug 2019 22:11:10 +0200 Subject: [PATCH] Put reason in audit log --- commands/admin/ban.js | 2 +- commands/admin/kick.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/admin/ban.js b/commands/admin/ban.js index b1a53bad..77bf1c0a 100644 --- a/commands/admin/ban.js +++ b/commands/admin/ban.js @@ -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}".`)); } } diff --git a/commands/admin/kick.js b/commands/admin/kick.js index c8e34f46..3da9371f 100644 --- a/commands/admin/kick.js +++ b/commands/admin/kick.js @@ -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)); }