1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-05 10:22:31 +01:00

fix: nickmane reset by command

This commit is contained in:
Cyber 2024-08-19 08:10:19 +02:00
parent c7a03b42c6
commit 2212a84ded

View File

@ -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),