diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gateway/opcodes/LazyRequest.ts | 4 | ||||
-rw-r--r-- | src/util/interfaces/Activity.ts | 2 | ||||
-rw-r--r-- | src/util/schemas/AckBulkSchema.ts | 12 | ||||
-rw-r--r-- | src/util/schemas/IdentifySchema.ts | 6 | ||||
-rw-r--r-- | src/util/schemas/LazyRequestSchema.ts | 7 | ||||
-rw-r--r-- | src/util/schemas/MemberChangeProfileSchema.ts | 8 | ||||
-rw-r--r-- | src/util/schemas/UserProfileModifySchema.ts | 8 |
7 files changed, 28 insertions, 19 deletions
diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts index 64e50d92..cde91a75 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts @@ -267,7 +267,9 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { if (!Array.isArray(ranges)) throw new Error("Not a valid Array"); const member_count = await Member.count({ where: { guild_id } }); - const ops = await Promise.all(ranges.map((x) => getMembers(guild_id, x))); + const ops = await Promise.all( + ranges.map((x) => getMembers(guild_id, x as [number, number])), + ); // TODO: unsubscribe member_events that are not in op.members diff --git a/src/util/interfaces/Activity.ts b/src/util/interfaces/Activity.ts index 7654ba90..0227f242 100644 --- a/src/util/interfaces/Activity.ts +++ b/src/util/interfaces/Activity.ts @@ -36,7 +36,7 @@ export interface Activity { }; party?: { id?: string; - size?: [number]; // used to show the party's current and maximum size // TODO: array length 2 + size?: number[]; // used to show the party's current and maximum size // TODO: array length 2 }; assets?: { large_image?: string; // the id for a large asset of the activity, usually a snowflake diff --git a/src/util/schemas/AckBulkSchema.ts b/src/util/schemas/AckBulkSchema.ts index cf6dc597..5604c2fc 100644 --- a/src/util/schemas/AckBulkSchema.ts +++ b/src/util/schemas/AckBulkSchema.ts @@ -17,11 +17,9 @@ */ export interface AckBulkSchema { - read_states: [ - { - channel_id: string; - message_id: string; - read_state_type: number; // WHat is this? - }, - ]; + read_states: { + channel_id: string; + message_id: string; + read_state_type: number; // WHat is this? + }[]; } diff --git a/src/util/schemas/IdentifySchema.ts b/src/util/schemas/IdentifySchema.ts index fb48c2a4..cb967aed 100644 --- a/src/util/schemas/IdentifySchema.ts +++ b/src/util/schemas/IdentifySchema.ts @@ -109,7 +109,11 @@ export interface IdentifySchema { compress?: boolean; large_threshold?: number; largeThreshold?: number; - shard?: [bigint, bigint]; + /** + * @minItems 2 + * @maxItems 2 + */ + shard?: bigint[]; // puyo: changed from [bigint, bigint] because it breaks openapi guild_subscriptions?: boolean; capabilities?: number; client_state?: { diff --git a/src/util/schemas/LazyRequestSchema.ts b/src/util/schemas/LazyRequestSchema.ts index f69ae1f7..ee52d66c 100644 --- a/src/util/schemas/LazyRequestSchema.ts +++ b/src/util/schemas/LazyRequestSchema.ts @@ -19,7 +19,12 @@ export interface LazyRequestSchema { guild_id: string; channels?: { - [key: string]: [number, number][]; + /** + * @items.type integer + * @minItems 2 + * @maxItems 2 + */ + [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi }; activities?: boolean; threads?: boolean; diff --git a/src/util/schemas/MemberChangeProfileSchema.ts b/src/util/schemas/MemberChangeProfileSchema.ts index e955a0f1..06505ab9 100644 --- a/src/util/schemas/MemberChangeProfileSchema.ts +++ b/src/util/schemas/MemberChangeProfileSchema.ts @@ -21,9 +21,9 @@ export interface MemberChangeProfileSchema { nick?: string; bio?: string; pronouns?: string; - - /* - * @items.type integer + /** + * @minItems 2 + * @maxItems 2 */ - theme_colors?: [number, number]; + theme_colors?: number[]; // puyo: changed from [number, number] because it breaks openapi } diff --git a/src/util/schemas/UserProfileModifySchema.ts b/src/util/schemas/UserProfileModifySchema.ts index d49fe326..6f6777dd 100644 --- a/src/util/schemas/UserProfileModifySchema.ts +++ b/src/util/schemas/UserProfileModifySchema.ts @@ -21,9 +21,9 @@ export interface UserProfileModifySchema { accent_color?: number | null; banner?: string | null; pronouns?: string; - - /* - * @items.type integer + /** + * @minItems 2 + * @maxItems 2 */ - theme_colors?: [number, number]; + theme_colors?: number[]; // puyo: changed from [number, number] because it breaks openapi } |