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

This commit is contained in:
Mizarc authored and GitHub committed 2026-06-29 11:56:14 +01:00
1 parent 111b58e119
commit 5293386e15
4 files changed
+20 -2

No files matched your search

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