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, *, cache_flags=None, intents=None, automatic_shards=True, shard_id=None, shard_count=1, shard_ids=None, max_concurrency=None)¶
Bases:
objectRepresents the discord.http/gateway client of the bot.
- Parameters:
- cache_flags: GatewayCacheFlags | None¶
The cache flags that the gateway client is using, or None if not specified.
- automatic_shards: bool¶
Whether to automatically determine the number of shards to launch based on the gateway response.
- shard_ids: list[int] | None¶
A list of shard IDs to launch, or None to launch all shards from 0 to shard_count - 1.
- max_concurrency: int | None¶
The maximum number of shards to launch concurrently, or None to launch all shards at once.
- async change_presence(status) None¶
Changes the presence of all shards to the specified status.
- Parameters:
status (
PlayingStatus) – The status to change to.- Return type:
- async request_soundboard_sounds(*guild_ids) None¶
Requests the soundboard sounds of the guilds, through the shard each guild belongs to.
The sounds are dispatched in soundboard_sounds events, one per guild.
- async request_channel_info(guild_id, *, fields=None) None¶
Requests the ephemeral channel data of a guild, through the shard the guild belongs to.
The data is dispatched in a channel_info event.