mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-16 06:03:11 +00:00
Fix refs to abc.Connectable.connect
This commit is contained in:
parent
01906f37f1
commit
1dccd70b05
@ -1686,14 +1686,14 @@ class Connectable(Protocol):
|
||||
*,
|
||||
timeout: float = 60.0,
|
||||
reconnect: bool = True,
|
||||
cls: Callable[[Client, Connectable], T] = VoiceClient,
|
||||
cls: Callable[[Client, Connectable], T] = MISSING,
|
||||
) -> T:
|
||||
"""|coro|
|
||||
|
||||
Connects to voice and creates a :class:`VoiceClient` to establish
|
||||
Connects to voice and creates a :class:`~discord.VoiceClient` to establish
|
||||
your connection to the voice server.
|
||||
|
||||
This requires :attr:`Intents.voice_states`.
|
||||
This requires :attr:`~discord.Intents.voice_states`.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
@ -1703,7 +1703,7 @@ class Connectable(Protocol):
|
||||
Whether the bot should automatically attempt
|
||||
a reconnect if a part of the handshake fails
|
||||
or the gateway goes down.
|
||||
cls: Type[:class:`VoiceProtocol`]
|
||||
cls: Type[:class:`~discord.VoiceProtocol`]
|
||||
A type that subclasses :class:`~discord.VoiceProtocol` to connect with.
|
||||
Defaults to :class:`~discord.VoiceClient`.
|
||||
|
||||
@ -1729,6 +1729,10 @@ class Connectable(Protocol):
|
||||
raise ClientException('Already connected to a voice channel.')
|
||||
|
||||
client = state._get_client()
|
||||
|
||||
if cls is MISSING:
|
||||
cls = VoiceClient
|
||||
|
||||
voice = cls(client, self)
|
||||
|
||||
if not isinstance(voice, VoiceProtocol):
|
||||
|
@ -3368,6 +3368,7 @@ Connectable
|
||||
.. attributetable:: discord.abc.Connectable
|
||||
|
||||
.. autoclass:: discord.abc.Connectable()
|
||||
:members:
|
||||
|
||||
.. _discord_api_models:
|
||||
|
||||
|
@ -72,7 +72,7 @@ New Features
|
||||
- Add :attr:`MessageReference.jump_url` (:issue:`6318`)
|
||||
- Add :attr:`File.spoiler` (:issue:`6317`)
|
||||
- Add support for passing ``roles`` to :meth:`Guild.estimate_pruned_members` (:issue:`6538`)
|
||||
- Allow callable class factories to be used in :meth:`abc.Connectable.play` (:issue:`6478`)
|
||||
- Allow callable class factories to be used in :meth:`abc.Connectable.connect` (:issue:`6478`)
|
||||
- Add a way to get mutual guilds from the client's cache via :attr:`User.mutual_guilds` (:issue:`2539`, :issue:`6444`)
|
||||
- :meth:`PartialMessage.edit` now returns a full :class:`Message` upon success (:issue:`6309`)
|
||||
- Add :attr:`RawMessageUpdateEvent.guild_id` (:issue:`6489`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user