Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. Happy.bans[banMember.id] = {
  2. guild: message.guild.id,
  3. name: `<@${banMember.id}>`,
  4. Channel: message.channel.id,
  5. time: Date.now() + parseInt(args[1]) * 1000,
  6. Reason: reason,
  7. Date_and_Hour: TheDate+" || "+clock+" "+amORpm,
  8. }
  9. const modlog = message.guild.channels.find(channel => channel.name === 'mod-logs');
  10.  
  11. await fs.writeFile("./Storage/bans.json", JSON.stringify(Happy.bans, null,4), err =>{
  12. if(err) throw err;
  13. const banembed = new Discord.RichEmbed()
  14. .setAuthor(' Action | Temp-ban', `http://pluspng.com/img-png/thor-hammer-png--1600.png`)
  15. .addField('Moderator that issued the temp-ban: ', `${issuer}`,true)
  16. .addField('Member temp-banned: ', `<@${banMember.id}>`,true)
  17. .addField(`How much time got temp-banned?:`,`${bantime} seconds = (${realtime}) ${convertor}`,true)
  18. .addField('Reason of temp-ban: ', `${reason}`,true)
  19. .addField(`When it was temp-banned that person:`,TheDate+ " at "+ clock+" "+amORpm,true)
  20. .setColor('#D9D900')
  21. modlog.send(banembed)
  22.  
  23. })
  24.  
  25. await banMember.send(`Hello there, you have been banned from ${message.guild.name} for: ${reason}`).then(() =>
  26. message.guild.ban(banMember, { time: bantime, reason: reason})).catch(err => console.log(err));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement