mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix: gateway properties
This commit is contained in:
parent
3c1465c0ee
commit
f061dccf3f
@ -151,7 +151,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
||||
shardStart: this.options?.shards?.start,
|
||||
shardEnd: this.options?.shards?.end ?? this.options?.shards?.total,
|
||||
totalShards: this.options?.shards?.total ?? this.options?.shards?.end,
|
||||
properties: { ...this.options?.gateway?.properties, ...properties },
|
||||
properties: { ...properties, ...this.options?.gateway?.properties },
|
||||
compress: this.options?.gateway?.compress,
|
||||
});
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { WorkerAdapter } from '../cache';
|
||||
import { LogLevels, MergeOptions, lazyLoadPackage, type DeepPartial, type When } from '../common';
|
||||
import { EventHandler } from '../events';
|
||||
import { ClientUser } from '../structures';
|
||||
import { Shard, type ShardManagerOptions, type WorkerData } from '../websocket';
|
||||
import { Shard, properties, type ShardManagerOptions, type WorkerData } from '../websocket';
|
||||
import type {
|
||||
WorkerReady,
|
||||
WorkerReceivePayload,
|
||||
@ -22,7 +22,7 @@ import type {
|
||||
import type { ManagerMessages } from '../websocket/discord/workermanager';
|
||||
import type { BaseClientOptions, ServicesOptions, StartOptions } from './base';
|
||||
import { BaseClient } from './base';
|
||||
import type { Client } from './client';
|
||||
import type { Client, ClientOptions } from './client';
|
||||
import { onInteractionCreate } from './oninteractioncreate';
|
||||
import { defaultArgsParser, defaultOptionsParser, onMessageCreate } from './onmessagecreate';
|
||||
import { Collectors } from './collectors';
|
||||
@ -211,6 +211,10 @@ export class WorkerClient<Ready extends boolean = boolean> extends BaseClient {
|
||||
info: data.info,
|
||||
compress: data.compress,
|
||||
debugger: this.debugger,
|
||||
properties: {
|
||||
...properties,
|
||||
...this.options.gateway?.properties,
|
||||
},
|
||||
async handlePayload(shardId, payload) {
|
||||
await handlePayload?.(shardId, payload);
|
||||
await onPacket?.(payload, shardId);
|
||||
@ -403,4 +407,5 @@ interface WorkerClientOptions extends BaseClientOptions {
|
||||
disabledCache: Cache['disabledCache'];
|
||||
commands?: NonNullable<Client['options']>['commands'];
|
||||
handlePayload?: ShardManagerOptions['handlePayload'];
|
||||
gateway?: ClientOptions['gateway'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user