mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-14 15:55:56 +00:00
allow setting communication_disabled_until
This commit is contained in:
@@ -128,6 +128,11 @@ router.patch(
|
||||
member.roles = body.roles.map((x) => Role.create({ id: x }));
|
||||
}
|
||||
|
||||
if ("communication_disabled_until" in body) {
|
||||
permission.hasThrow("MODERATE_MEMBERS");
|
||||
member.communication_disabled_until = body.communication_disabled_until == null ? null : new Date(body.communication_disabled_until) ;
|
||||
}
|
||||
|
||||
await member.save();
|
||||
|
||||
member.roles = member.roles.filter((x) => x.id !== guild_id);
|
||||
|
||||
Reference in New Issue
Block a user