mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-13 06:02:39 +01:00
Merge branch 'fix/nicknames' into slowcord
This commit is contained in:
commit
fcf879980d
@ -35,10 +35,7 @@ router.patch("/", route({ body: "MemberChangeSchema" }), async (req: Request, re
|
||||
member.roles = body.roles.map((x) => new Role({ id: x })); // foreign key constraint will fail if role doesn't exist
|
||||
}
|
||||
|
||||
if ('nick' in body) {
|
||||
permission.hasThrow("CHANGE_NICKNAME");
|
||||
Member.changeNickname(member.id, member.guild.id, body.nick!);
|
||||
}
|
||||
if (body.nick) member.nick = body.nick;
|
||||
|
||||
await member.save();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user