Development (#11)

We need this NOW.

---------

Co-authored-by: PineaFan <ash@pinea.dev>
Co-authored-by: pineafan <pineapplefanyt@gmail.com>
Co-authored-by: PineappleFan <PineaFan@users.noreply.github.com>
Co-authored-by: Skyler <skyler3665@gmail.com>
diff --git a/src/events/inviteCreate.ts b/src/events/inviteCreate.ts
index a267f09..34f66dc 100644
--- a/src/events/inviteCreate.ts
+++ b/src/events/inviteCreate.ts
@@ -7,7 +7,8 @@
 
 export async function callback(client: NucleusClient, invite: Invite) {
     if(!invite.guild) return; // This is a DM invite (not a guild invite
-    const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
+    const { getAuditLog, isLogging, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
+    if (!await isLogging(invite.guild.id, "guildUpdate")) return;
     const auditLog = (await getAuditLog(invite.guild as Guild, AuditLogEvent.InviteCreate))
         .filter((entry: GuildAuditLogsEntry) => (entry.target as Invite)!.code === invite.code)[0]!;
     if (auditLog.executor!.id === client.user!.id) return;
@@ -18,7 +19,7 @@
             calculateType: "guildUpdate",
             color: NucleusColors.green,
             emoji: "INVITE.CREATE",
-            timestamp: invite.createdTimestamp
+            timestamp: invite.createdTimestamp ?? Date.now()
         },
         list: {
             channel: entry(invite.channel!.id, renderChannel(invite.channel as GuildChannel)),