Client¶
Note
Keep in mind that this is not generally used by you, but rather by discord.http only.
discord_http.gateway.client module¶
- class discord_http.gateway.client.GatewayClient(bot: Client, *, cache_flags: GatewayCacheFlags | None = None, intents: Intents | None = None, automatic_shards: bool = True, shard_id: int | None = None, shard_count: int = 1, shard_ids: list[int] | None = None, max_concurrency: int | None = None)[source]¶
Bases:
object
- async change_presence(status: PlayingStatus) None [source]¶
Changes the presence of all shards to the specified status.
- Parameters:
status (PlayingStatus) – The status to change to.
- get_shard(shard_id: int) Shard | None [source]¶
Returns the shard object of the shard with the specified ID.
- Parameters:
shard_id (int) – The ID of the shard to get.
- Returns:
The shard object with the specified ID, or None if not found.
- Return type:
Optional[Shard]