mirror of
https://github.com/fluxerapp/fluxer.git
synced 2026-09-02 21:04:06 +03:00
fix(schema): add missing with_counts fields to GuildResponse and GuildAdminResponse schemas (#1213)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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>>;
|
||||
|
||||
Reference in New Issue
Block a user