allow setting communication_disabled_until

This commit is contained in:
Rory&
2025-11-25 18:20:01 +01:00
parent df6f2c06d1
commit 03bb33b1bc
4 changed files with 6 additions and 0 deletions
Binary file not shown.
Binary file not shown.
@@ -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);
@@ -21,4 +21,5 @@ export interface MemberChangeSchema {
nick?: string;
avatar?: string | null;
bio?: string;
communication_disabled_until?: string | null;
}