allow setting communication_disabled_until

This commit is contained in:
Rory& committed 2025-11-25 18:20:01 +01:00
1 parent df6f2c06d1
commit 03bb33b1bc
4 files changed
+6

No files matched your search

@@ -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);