From 3828a0e35c0f144708f806e27ea08e71b052cb6b Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 31 Jan 2024 23:57:56 +1100 Subject: [PATCH] Hacky workaround for timestamp thing when member is banned --- src/events/guildMemberRemove.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/events/guildMemberRemove.ts b/src/events/guildMemberRemove.ts index 8ce1743..29f36f3 100644 --- a/src/events/guildMemberRemove.ts +++ b/src/events/guildMemberRemove.ts @@ -4,7 +4,10 @@ export default class GuildMemberRemove { static async run(client:TClient, member:Discord.GuildMember){ if (!client.config.botSwitches.logs) return; if (!member.joinedTimestamp || member.guild?.id != client.config.dcServer.id) return; - if (client.guilds.cache.get(client.config.dcServer.id).bans.cache.has(member.id)) return await client.userLevels.deleteUser(member.id); + if (client.guilds.cache.get(client.config.dcServer.id).bans.cache.has(member.id)) { + (client.channels.resolve(client.config.dcServer.channels.logs) as Discord.TextChannel).send(`**${member.user.username}**'s join date is `) + return await client.userLevels.deleteUser(member.id); + }; let isBot = 'Bot'; if (!member.user.bot) isBot = 'Member'; const levelData = await client.userLevels.fetchUser(member.id);