fixing event logs
diff --git a/src/events/memberJoin.ts b/src/events/memberJoin.ts
index daf195a..77b111f 100644
--- a/src/events/memberJoin.ts
+++ b/src/events/memberJoin.ts
@@ -8,7 +8,8 @@
export async function callback(client: NucleusClient, member: GuildMember) {
welcome(client, member);
statsChannelAdd(client, member);
- const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
+ const { log, isLogging, NucleusColors, entry, renderUser, renderDelta } = client.logger;
+ if (!await isLogging(member.guild.id, "guildMemberUpdate")) return;
await client.database.history.create("join", member.guild.id, member.user, null, null);
const data = {
meta: {
@@ -17,7 +18,7 @@
calculateType: "guildMemberUpdate",
color: NucleusColors.green,
emoji: "MEMBER" + (member.user.bot ? ".BOT" : "") + ".JOIN",
- timestamp: member.joinedTimestamp
+ timestamp: member.joinedTimestamp ?? Date.now()
},
list: {
memberId: entry(member.id, `\`${member.id}\``),