blob: 596bf5871d40958798edb3d999c742e174dbb55e [file] [log] [blame]
pineafan32767212022-03-14 21:27:39 +00001const {addLog} = require('../scripts/addLogs');
2
3module.exports = {
4 name:'inviteCreate',
5 once:false,
6 async execute(invite) {
7
8 const i = await invite.guild.invites.fetch(invite.code)
9
10 let data = {
11 channel: invite.channel.id,
12 code: invite.code,
13 createdAt: invite.createdTimestamp,
14 expiresAt: invite.expiresTimestamp,
15 createdBy: invite.inviter.id,
16 maxUsage: i.maxUses,
17 maxAge: i.maxAge
18 }
19
20 addLog(invite.guild.id, data)
21 }
22}