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

Merge pull request #1190 from CyberL1/fix/nick-command

fix: nickmane reset by command
This commit is contained in:
Madeline 2024-08-19 16:20:25 +10:00 committed by GitHub
commit 8587df6c74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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