diff --git a/assets/openapi.json b/assets/openapi.json
index 4c045736..0e21164c 100644
--- a/assets/openapi.json
+++ b/assets/openapi.json
@@ -2305,8 +2305,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"required": [
@@ -7771,6 +7778,9 @@
"forEachAsync": {
"type": "boolean"
},
+ "filterAsync": {
+ "type": "boolean"
+ },
"remove": {
"type": "boolean"
},
@@ -10892,6 +10902,10 @@
},
"bio": {
"type": "string"
+ },
+ "communication_disabled_until": {
+ "type": "string",
+ "nullable": true
}
}
},
@@ -14172,6 +14186,40 @@
]
}
},
+ "/users/@me/mentions": {
+ "get": {
+ "security": [
+ {
+ "bearer": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MessageListResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/APIErrorResponse"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "users"
+ ]
+ }
+ },
"/users/@me/library/": {
"get": {
"security": [
diff --git a/assets/schemas.json b/assets/schemas.json
index 5b8ea8d7..bbf6461f 100644
--- a/assets/schemas.json
+++ b/assets/schemas.json
@@ -2430,8 +2430,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -5758,8 +5765,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -12692,8 +12706,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -16503,8 +16524,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -20108,8 +20136,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -24112,8 +24147,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -27600,8 +27642,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -31293,8 +31342,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -35226,8 +35282,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -38527,8 +38590,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -40479,6 +40549,9 @@
"forEachAsync": {
"type": "boolean"
},
+ "filterAsync": {
+ "type": "boolean"
+ },
"remove": {
"type": "boolean"
},
@@ -40702,6 +40775,9 @@
"forEachAsync": {
"type": "boolean"
},
+ "filterAsync": {
+ "type": "boolean"
+ },
"remove": {
"type": "boolean"
},
@@ -45245,8 +45321,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -49378,8 +49461,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -54400,8 +54490,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -57760,8 +57857,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -61152,8 +61256,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -64759,8 +64870,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -67919,8 +68037,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -71761,8 +71886,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -73427,8 +73559,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -79029,8 +79168,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -82497,8 +82643,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -85924,8 +86077,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -89752,8 +89912,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -93766,8 +93933,15 @@
"type": "string"
},
"communication_disabled_until": {
- "type": "string",
- "format": "date-time"
+ "anyOf": [
+ {
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -97489,6 +97663,12 @@
},
"bio": {
"type": "string"
+ },
+ "communication_disabled_until": {
+ "type": [
+ "null",
+ "string"
+ ]
}
},
"additionalProperties": false,
@@ -100010,6 +100190,9 @@
"forEachAsync": {
"type": "boolean"
},
+ "filterAsync": {
+ "type": "boolean"
+ },
"remove": {
"type": "boolean"
},
diff --git a/src/api/routes/guilds/#guild_id/members/#member_id/index.ts b/src/api/routes/guilds/#guild_id/members/#member_id/index.ts
index faa8ae8f..8b2aa832 100644
--- a/src/api/routes/guilds/#guild_id/members/#member_id/index.ts
+++ b/src/api/routes/guilds/#guild_id/members/#member_id/index.ts
@@ -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);
diff --git a/src/schemas/uncategorised/MemberChangeSchema.ts b/src/schemas/uncategorised/MemberChangeSchema.ts
index e1ee0969..8804eff3 100644
--- a/src/schemas/uncategorised/MemberChangeSchema.ts
+++ b/src/schemas/uncategorised/MemberChangeSchema.ts
@@ -21,4 +21,5 @@ export interface MemberChangeSchema {
nick?: string;
avatar?: string | null;
bio?: string;
+ communication_disabled_until?: string | null;
}
|