ShardManager
Extends
Map
<number
,Shard
>
Constructors
new ShardManager(options)
Parameters
Parameter | Type |
---|---|
options | ShardManagerOptions |
Returns
Overrides
Map<number, Shard>.constructor
Source
seyfert/src/websocket/discord/sharder.ts:27
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
[toStringTag] | readonly | string | - | Map.[toStringTag] |
connectQueue | public | ConnectQueue | - | - |
debugger? | public | Logger | - | - |
options | public | ShardManagerOptions | - | - |
size | readonly | number | Map.size | |
[species] | readonly | MapConstructor | - | Map.[species] |
Accessors
concurrency
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:57
latency
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:61
remaining
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:53
shardEnd
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:49
shardStart
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:45
totalShards
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:41
Methods
[iterator]
()
Returns an iterable of entries in the map.
Returns
IterableIterator
<[number
, Shard
]>
Inherited from
Map.[iterator]
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts:119
calculateShardId()
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
number
Source
seyfert/src/websocket/discord/sharder.ts:69
clear()
Returns
void
Inherited from
Map.clear
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts:20
delete()
Parameters
Parameter | Type |
---|---|
key | number |
Returns
boolean
true if an element in the Map existed and has been removed, or false if the element does not exist.
Inherited from
Map.delete
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts:24
disconnect()
Parameters
Parameter | Type |
---|---|
shardId | number |
Returns
undefined
| Promise
<void
>
Source
seyfert/src/websocket/discord/sharder.ts:130
disconnectAll()
Returns
Promise
<unknown
>
Source
seyfert/src/websocket/discord/sharder.ts:135
entries()
Returns an iterable of key, value pairs for every entry in the map.
Returns
IterableIterator
<[number
, Shard
]>
Inherited from
Map.entries
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts:124
forEach()
Executes a provided function once per each key/value pair in the Map, in insertion order.
Parameters
Parameter | Type |
---|---|
callbackfn | (value : Shard , key : number , map : Map <number , Shard >) => void |
thisArg ? | any |
Returns
void
Inherited from
Map.forEach
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts:28
forceIdentify()
Parameters
Parameter | Type |
---|---|
shardId | number |
Returns
Promise
<void
>
Source
seyfert/src/websocket/discord/sharder.ts:125
get()
Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
Parameters
Parameter | Type |
---|---|
key | number |
Returns
undefined
| Shard
Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
Inherited from
Map.get
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts:33
has()
Parameters
Parameter | Type |
---|---|
key | number |
Returns
boolean
boolean indicating whether an element with the specified key exists or not.
Inherited from
Map.has
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts:37
joinVoice()
Parameters
Parameter | Type |
---|---|
guild_id | string |
channel_id | string |
options | Object |
options.selfDeaf | boolean |
options.selfMute | boolean |
Returns
void
Source
seyfert/src/websocket/discord/sharder.ts:160
keys()
Returns an iterable of keys in the map
Returns
IterableIterator
<number
>
Inherited from
Map.keys
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts:129
leaveVoice()
Parameters
Parameter | Type |
---|---|
guild_id | string |
Returns
void
Source
seyfert/src/websocket/discord/sharder.ts:178
send()
Type parameters
Type parameter |
---|
T extends GatewaySendPayload |
Parameters
Parameter | Type |
---|---|
shardId | number |
payload | T |
Returns
void
Source
seyfert/src/websocket/discord/sharder.ts:193
set()
Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
Parameters
Parameter | Type |
---|---|
key | number |
value | Shard |
Returns
this
Inherited from
Map.set
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts:41
setPresence()
Parameters
Parameter | Type |
---|---|
payload | GatewayPresenceUpdateData |
Returns
Promise
<void
>
Source
seyfert/src/websocket/discord/sharder.ts:151
setShardPresence()
Parameters
Parameter | Type |
---|---|
shardId | number |
payload | GatewayPresenceUpdateData |
Returns
void
Source
seyfert/src/websocket/discord/sharder.ts:143
spawn()
Parameters
Parameter | Type |
---|---|
shardId | number |
Returns
Shard
Source
seyfert/src/websocket/discord/sharder.ts:73
spawnBuckets()
Returns
Shard
[][]
Source
seyfert/src/websocket/discord/sharder.ts:112
spawnShards()
Returns
Promise
<void
>
Source
seyfert/src/websocket/discord/sharder.ts:93
values()
Returns an iterable of values in the map
Returns
IterableIterator
<Shard
>
Inherited from
Map.values
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts:134
groupBy()
Groups members of an iterable according to the return value of the passed callback.
Type parameters
Type parameter |
---|
K |
T |
Parameters
Parameter | Type | Description |
---|---|---|
items | Iterable <T > | An iterable. |
keySelector | (item : T , index : number ) => K | A callback which will be invoked for each item in items. |
Returns
Map
<K
, T
[]>
Inherited from
Map.groupBy
Source
node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.collection.d.ts:25