1
0
Fork 0

Put reason in audit log

akairo
loicbersier 5 years ago
parent 7380224fa4
commit d86f89e01b

@ -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}".`));
}
}

@ -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));
}

Loading…
Cancel
Save