fix: shard options

This commit is contained in:
MARCROCK22 2024-11-26 09:37:29 -04:00
parent 2d29f011ab
commit c14c7d296d
3 changed files with 14 additions and 9 deletions

View File

@ -9,8 +9,10 @@ import {
ClientUser, ClientUser,
DMChannel, DMChannel,
DirectoryChannel, DirectoryChannel,
Entitlement,
ForumChannel, ForumChannel,
Guild, Guild,
GuildBan,
GuildEmoji, GuildEmoji,
GuildMember, GuildMember,
GuildRole, GuildRole,
@ -30,8 +32,6 @@ import {
Webhook, Webhook,
WebhookMessage, WebhookMessage,
} from '../structures'; } from '../structures';
import { Entitlement } from '../structures/Entitlement';
import { GuildBan } from '../structures/GuildBan';
import type { ChannelType } from '../types'; import type { ChannelType } from '../types';
export type PollStructure = InferCustomStructure<Poll, 'Poll'>; export type PollStructure = InferCustomStructure<Poll, 'Poll'>;

View File

@ -15,3 +15,5 @@ export * from './VoiceState';
export * from './Webhook'; export * from './Webhook';
export * from './channels'; export * from './channels';
export * from './Poll'; export * from './Poll';
export * from './GuildBan';
export * from './Entitlement';

View File

@ -46,13 +46,16 @@ export class Shard {
public id: number, public id: number,
options: ShardOptions, options: ShardOptions,
) { ) {
this.options = MergeOptions<Shard['options']>(options, { this.options = MergeOptions<Shard['options']>(
properties, {
ratelimitOptions: { properties,
rateLimitResetInterval: 60_000, ratelimitOptions: {
maxRequestsPerRateLimitTick: 120, rateLimitResetInterval: 60_000,
}, maxRequestsPerRateLimitTick: 120,
} as ShardOptions); },
} as ShardOptions,
options,
);
this.logger = new Logger({ this.logger = new Logger({
name: `[Shard #${id}]`, name: `[Shard #${id}]`,