forked from Supositware/Haha-Yes
fixed for when the concerned user dosent have DM activated
This commit is contained in:
parent
12ad9b942d
commit
0e3372e07d
2 changed files with 6 additions and 2 deletions
|
@ -38,7 +38,9 @@ class BanCommand extends Command {
|
|||
if(member.id === message.author.id)
|
||||
return message.channel.send('Why would you ban yourself ?');
|
||||
|
||||
await member.send(`https://youtu.be/55-mHgUjZfY\nYou have been banned from **${message.guild.name}** 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}**"`)
|
||||
.catch(() => console.log('could not send message to the concerned user'));
|
||||
|
||||
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}".`));
|
||||
}
|
||||
|
|
|
@ -38,7 +38,9 @@ class KickCommand extends Command {
|
|||
if(!reasons)
|
||||
reasons = 'Nothing have been specified.';
|
||||
|
||||
await member.send(`You have been kicked from **${message.guild.name}** for the following reasons: "**${reasons}**"`);
|
||||
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}`)
|
||||
.then(() => message.reply(`${member.user.username} was succesfully kicked with the following reasons "${reasons}".`))
|
||||
.catch(err => console.error(err));
|
||||
|
|
Loading…
Reference in a new issue