Send message to the people getting kicked/banned with the reasons and from wich server

This commit is contained in:
Supositware 2019-03-12 20:23:56 +01:00
parent ccd2ee40bb
commit 12ad9b942d
2 changed files with 4 additions and 2 deletions

View file

@ -38,7 +38,8 @@ class BanCommand extends Command {
if(member.id === message.author.id) if(member.id === message.author.id)
return message.channel.send('Why would you ban yourself ?'); return message.channel.send('Why would you ban yourself ?');
member.ban(`Banned by : ${message.author.username} for the following reasons : ${reasons}`) await member.send(`https://youtu.be/55-mHgUjZfY\nYou have been banned from **${message.guild.name}** for the following reasons: "**${reasons}**"`);
return member.ban(`Banned by : ${message.author.username} for the following reasons : ${reasons}`)
.then(() => message.reply(`${member.user.username} was succesfully banned with the following reasons "${reasons}".`)); .then(() => message.reply(`${member.user.username} was succesfully banned with the following reasons "${reasons}".`));
} }
} }

View file

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