Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/discordeno/gateway/mod.ts>CreateShardManager

Discord API library for Deno
Extremely Popular
Go to Latest
interface CreateShardManager
import { type CreateShardManager } from "https://deno.land/x/discordeno@17.2.0/gateway/mod.ts";

Properties

optional
createShardOptions: Omit<CreateShard,
| "id"
| "totalShards"
| "requestIdentify"
| "gatewayConfig"
>

Options which are used to create a new Shard.

gatewayConfig: PickPartial<ShardGatewayConfig, "token">

Gateway configuration which is used when creating a Shard.

shardIds: number[]

Ids of the Shards which should be managed.

totalShards: number

Total amount of Shard used by the bot.

Methods

handleMessage(shard: Shard, message: DiscordGatewayPayload): unknown

This function is used when a shard receives any message from Discord.

requestIdentify(shardId: number): Promise<void>

This function communicates with the parent manager, in order to know whether this manager is allowed to identify a new shard. #