fix: client gateway properties types

This commit is contained in:
MARCROCK22 2024-03-24 11:49:50 -04:00
parent 8d7ab24cce
commit cd0ee971ec

View File

@ -11,7 +11,7 @@ import {
} from '../common'; } from '../common';
import { EventHandler } from '../events'; import { EventHandler } from '../events';
import { ClientUser } from '../structures'; import { ClientUser } from '../structures';
import { ShardManager, type ShardManagerOptions } from '../websocket'; import { ShardManager, properties, type ShardManagerOptions } from '../websocket';
import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate'; import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate';
import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate'; import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate';
import type { BaseClientOptions, InternalRuntimeConfig, ServicesOptions, StartOptions } from './base'; import type { BaseClientOptions, InternalRuntimeConfig, ServicesOptions, StartOptions } from './base';
@ -99,7 +99,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
shardStart: this.options?.shards?.start, shardStart: this.options?.shards?.start,
shardEnd: this.options?.shards?.end ?? this.options?.shards?.total, shardEnd: this.options?.shards?.end ?? this.options?.shards?.total,
totalShards: this.options?.shards?.total ?? this.options?.shards?.end, totalShards: this.options?.shards?.total ?? this.options?.shards?.end,
properties: this.options?.gateway?.properties, properties: { ...this.options?.gateway?.properties, ...properties },
compress: this.options?.gateway?.compress, compress: this.options?.gateway?.compress,
}); });
} }
@ -186,7 +186,7 @@ export interface ClientOptions extends BaseClientOptions {
total?: number; total?: number;
}; };
gateway?: { gateway?: {
properties?: ShardManagerOptions['properties']; properties?: Partial<ShardManagerOptions['properties']>;
compress?: ShardManagerOptions['compress']; compress?: ShardManagerOptions['compress'];
}; };
commands?: { commands?: {