blob: 596bf5871d40958798edb3d999c742e174dbb55e [file] [log] [blame]
const {addLog} = require('../scripts/addLogs');
module.exports = {
name:'inviteCreate',
once:false,
async execute(invite) {
const i = await invite.guild.invites.fetch(invite.code)
let data = {
channel: invite.channel.id,
code: invite.code,
createdAt: invite.createdTimestamp,
expiresAt: invite.expiresTimestamp,
createdBy: invite.inviter.id,
maxUsage: i.maxUses,
maxAge: i.maxAge
}
addLog(invite.guild.id, data)
}
}