Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Happy.bans[banMember.id] = {
- guild: message.guild.id,
- name: `<@${banMember.id}>`,
- Channel: message.channel.id,
- time: Date.now() + parseInt(args[1]) * 1000,
- Reason: reason,
- Date_and_Hour: TheDate+" || "+clock+" "+amORpm,
- }
- const modlog = message.guild.channels.find(channel => channel.name === 'mod-logs');
- await fs.writeFile("./Storage/bans.json", JSON.stringify(Happy.bans, null,4), err =>{
- if(err) throw err;
- const banembed = new Discord.RichEmbed()
- .setAuthor(' Action | Temp-ban', `http://pluspng.com/img-png/thor-hammer-png--1600.png`)
- .addField('Moderator that issued the temp-ban: ', `${issuer}`,true)
- .addField('Member temp-banned: ', `<@${banMember.id}>`,true)
- .addField(`How much time got temp-banned?:`,`${bantime} seconds = (${realtime}) ${convertor}`,true)
- .addField('Reason of temp-ban: ', `${reason}`,true)
- .addField(`When it was temp-banned that person:`,TheDate+ " at "+ clock+" "+amORpm,true)
- .setColor('#D9D900')
- modlog.send(banembed)
- })
- await banMember.send(`Hello there, you have been banned from ${message.guild.name} for: ${reason}`).then(() =>
- message.guild.ban(banMember, { time: bantime, reason: reason})).catch(err => console.log(err));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement