fix(schema): add missing with_counts fields to GuildResponse and GuildAdminResponse schemas (#1213)

This commit is contained in:
Mizarc
2026-06-29 11:56:14 +01:00
committed by GitHub
parent 111b58e119
commit 5293386e15
4 changed files with 20 additions and 2 deletions
+3 -1
View File
@@ -12197,7 +12197,9 @@
"description": "Custom content warning text shown before entry",
"nullable": true,
"type": "string"
}
},
"approximate_member_count": {"$ref": "#/components/schemas/Int32Type"},
"approximate_presence_count": {"$ref": "#/components/schemas/Int32Type"}
},
"required": [
"id",
+3 -1
View File
@@ -29981,7 +29981,9 @@
"description": "Channels visible to the requesting user from gateway state"
},
"member_count": {"$ref": "#/components/schemas/Int32Type"},
"online_count": {"$ref": "#/components/schemas/Int32Type"}
"online_count": {"$ref": "#/components/schemas/Int32Type"},
"approximate_member_count": {"$ref": "#/components/schemas/Int32Type"},
"approximate_presence_count": {"$ref": "#/components/schemas/Int32Type"}
},
"required": [
"id",
@@ -47,6 +47,12 @@ export const GuildAdminResponse = z.object({
.nullable()
.optional()
.describe('Custom content warning text shown before entry'),
approximate_member_count: Int32Type.optional().describe(
'Approximate total member count (only when with_counts is true)'
),
approximate_presence_count: Int32Type.optional().describe(
'Approximate online member count (only when with_counts is true)'
),
});
export type GuildAdminResponse = z.infer<typeof GuildAdminResponse>;
@@ -165,6 +165,12 @@ export const GuildResponse = z.object({
channels: z.array(ChannelResponse).optional().describe('Channels visible to the requesting user from gateway state'),
member_count: Int32Type.optional().describe('Total number of members in the guild'),
online_count: Int32Type.optional().describe('Number of online members visible in the guild'),
approximate_member_count: Int32Type.optional().describe(
'Approximate total member count (only when with_counts is true)',
),
approximate_presence_count: Int32Type.optional().describe(
'Approximate online member count (only when with_counts is true)',
),
});
export type GuildResponse = z.infer<typeof GuildResponse>;
@@ -232,6 +238,8 @@ export interface Guild {
readonly unavailable_hidden?: boolean;
readonly member_count?: number;
readonly online_count?: number;
readonly approximate_member_count?: number;
readonly approximate_presence_count?: number;
readonly roles?: ReadonlyArray<z.infer<typeof GuildRoleResponse>>;
readonly emojis?: ReadonlyArray<z.infer<typeof GuildEmojiResponse>>;
readonly stickers?: ReadonlyArray<z.infer<typeof GuildStickerResponse>>;