Skip to content

Commit

Permalink
Merge pull request spacebarchat#1190 from CyberL1/fix/nick-command
Browse files Browse the repository at this point in the history
fix: nickmane reset by command
  • Loading branch information
MaddyUnderStars authored Aug 19, 2024
2 parents c7a03b4 + 2212a84 commit 8587df6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/entities/Member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -300,7 +302,7 @@ export class Member extends BaseClassWithoutId {
data: {
guild_id,
user: member.user,
nick: nickname,
nick: nickname || null,
},
guild_id,
} as GuildMemberUpdateEvent),
Expand Down

0 comments on commit 8587df6

Please sign in to comment.