No summary provided.
Extends
AsyncEventEmitter<MappedEvents>Constructs a new instance of the
Client
className | Type | Optional | Description |
---|---|---|---|
{ rest, gateway } | ClientOptions | No | None |
requestGuildMembers(options, timeout?):Promise<{ members: APIGuildMember[]; nonce: string; notFound: unknown[]; presences: GatewayGuildMembersChunkPresence[]; }>
Requests guild members from the gateway.
Example
Requesting specific members from a guildName | Type | Optional | Description |
---|---|---|---|
options | GatewayRequestGuildMembersData | No | The options for the request |
timeout | number | Yes | The timeout for waiting for each guild members chunk event |
requestGuildMembersIterator(options, timeout?):AsyncGenerator<{ members: APIGuildMember[]; nonce: string; notFound: unknown[] | null; presences: GatewayGuildMembersChunkPresence[] | null; chunkIndex: number; chunkCount: number; }, void, unknown>
Requests guild members from the gateway and returns an async iterator that yields the data from each guild members chunk event.
Example
Requesting all members from a guildName | Type | Optional | Description |
---|---|---|---|
options | GatewayRequestGuildMembersData | No | The options for the request |
timeout | number | Yes | The timeout for waiting for each guild members chunk event |
Updates the presence of the bot user
Name | Type | Optional | Description |
---|---|---|---|
shardId | number | No | The id of the shard to update the presence in |
options | GatewayPresenceUpdateData | No | The options for updating the presence |
Updates the voice state of the bot user
Name | Type | Optional | Description |
---|---|---|---|
options | GatewayVoiceStateUpdateData | No | The options for updating the voice state |