few changes
diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
new file mode 100644
index 0000000..a1601bb
--- /dev/null
+++ b/src/events/guildMemberUpdate.ts
@@ -0,0 +1,36 @@
+import { callback as statsChannelAdd } from '../automations/statsChannelAdd.js';
+import { callback as welcome } from '../automations/welcome.js';
+import log from '../utils/log.js';
+export const event = 'guildMemberUpdate'
+
+export async function callback(client, before, after) {
+ try {
+ const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = after.client.logger
+ if (before.nickname != after.nickname) {
+ let auditLog = await getAuditLog(after.guild, 'MEMBER_UPDATE');
+ let audit = auditLog.entries.filter(entry => entry.target.id == after.id).first();
+ if (audit.executor.id == client.user.id) return;
+ let data = {
+ meta: {
+ type: 'memberUpdate',
+ displayName: 'Nickname Changed',
+ calculateType: 'guildMemberUpdate',
+ color: NucleusColors.yellow,
+ emoji: "PUNISH.NICKNAME.YELLOW",
+ timestamp: new Date().getTime()
+ },
+ list: {
+ id: entry(after.id, `\`${after.id}\``),
+ before: entry(before.nickname, before.nickname ? before.nickname : '*None*'),
+ after: entry(after.nickname, after.nickname ? after.nickname : '*None*'),
+ updated: entry(new Date().getTime(), renderDelta(new Date().getTime())),
+ updatedBy: entry(audit.executor.id, renderUser(audit.executor))
+ },
+ hidden: {
+ guild: after.guild.id
+ }
+ }
+ log(data, after.client);
+ }
+ } catch (e) { console.log(e) }
+}