From 2212a84ded37d7385016af3aac20e7b26f2e9673 Mon Sep 17 00:00:00 2001 From: Cyber Date: Mon, 19 Aug 2024 08:10:19 +0200 Subject: [PATCH] fix: nickmane reset by command --- src/util/entities/Member.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/entities/Member.ts b/src/util/entities/Member.ts index 3ef778ac..df97e469 100644 --- a/src/util/entities/Member.ts +++ b/src/util/entities/Member.ts @@ -290,7 +290,9 @@ export class Member extends BaseClassWithoutId { }, relations: ["user"], }); - member.nick = nickname; + + // @ts-expect-error Member nickname is nullable + member.nick = nickname || null; await Promise.all([ member.save(), @@ -300,7 +302,7 @@ export class Member extends BaseClassWithoutId { data: { guild_id, user: member.user, - nick: nickname, + nick: nickname || null, }, guild_id, } as GuildMemberUpdateEvent),