Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/events/inviteCreate.ts b/src/events/inviteCreate.ts
index 5d47bf8..1cbed02 100644
--- a/src/events/inviteCreate.ts
+++ b/src/events/inviteCreate.ts
@@ -1,32 +1,30 @@
-import humanizeDuration from 'humanize-duration';
-export const event = 'inviteCreate'
+import humanizeDuration from "humanize-duration";
+export const event = "inviteCreate";
export async function callback(client, invite) {
- try {
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = invite.client.logger
- let auditLog = await getAuditLog(invite.guild, 'INVITE_CREATE');
- let audit = auditLog.entries.filter(entry => entry.target.id === invite.id).first();
- if (audit.executor.id === client.user.id) return;
- let data = {
- meta: {
- type: 'inviteCreate',
- displayName: 'Invite Created',
- calculateType: 'guildUpdate',
- color: NucleusColors.green,
- emoji: "INVITE.CREATE",
- timestamp: invite.createdTimestamp
- },
- list: {
- channel: entry(invite.channel.id, renderChannel(invite.channel)),
- link: entry(invite.url, invite.url),
- expires: entry(invite.maxAge, invite.maxAge ? humanizeDuration(invite.maxAge * 1000) : 'Never'),
- createdBy: entry(audit.executor.id, renderUser(audit.executor)),
- created: entry(invite.createdTimestamp, renderDelta(invite.createdTimestamp))
- },
- hidden: {
- guild: invite.guild.id
- }
+ const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = invite.client.logger;
+ const auditLog = await getAuditLog(invite.guild, "INVITE_CREATE");
+ const audit = auditLog.entries.filter(entry => entry.target.id === invite.id).first();
+ if (audit.executor.id === client.user.id) return;
+ const data = {
+ meta: {
+ type: "inviteCreate",
+ displayName: "Invite Created",
+ calculateType: "guildUpdate",
+ color: NucleusColors.green,
+ emoji: "INVITE.CREATE",
+ timestamp: invite.createdTimestamp
+ },
+ list: {
+ channel: entry(invite.channel.id, renderChannel(invite.channel)),
+ link: entry(invite.url, invite.url),
+ expires: entry(invite.maxAge, invite.maxAge ? humanizeDuration(invite.maxAge * 1000) : "Never"),
+ createdBy: entry(audit.executor.id, renderUser(audit.executor)),
+ created: entry(invite.createdTimestamp, renderDelta(invite.createdTimestamp))
+ },
+ hidden: {
+ guild: invite.guild.id
}
- log(data);
- } catch {}
+ };
+ log(data);
}