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