mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-17 18:46:40 +00:00
Fix invalid escape sequences in docstrings
This commit is contained in:
parent
aea459c293
commit
fa693d068a
@ -172,7 +172,7 @@ class Client:
|
|||||||
|
|
||||||
:param flood_sleep_threshold:
|
:param flood_sleep_threshold:
|
||||||
Maximum amount of time, in seconds, to automatically sleep before retrying a request.
|
Maximum amount of time, in seconds, to automatically sleep before retrying a request.
|
||||||
This sleeping occurs when ``FLOOD_WAIT`` (and similar) :class:`~telethon.RpcError`\ s are raised by Telegram.
|
This sleeping occurs when ``FLOOD_WAIT`` (and similar) :class:`~telethon.RpcError`\\ s are raised by Telegram.
|
||||||
|
|
||||||
:param logger:
|
:param logger:
|
||||||
Logger for the client.
|
Logger for the client.
|
||||||
|
@ -95,12 +95,12 @@ class All(Combinable):
|
|||||||
|
|
||||||
from telethon.events.filters import All, Command, Text
|
from telethon.events.filters import All, Command, Text
|
||||||
|
|
||||||
@bot.on(events.NewMessage, All(Command('/start'), Text(r'\bdata:\w+')))
|
@bot.on(events.NewMessage, All(Command('/start'), Text(r'\\bdata:\\w+')))
|
||||||
async def handler(event): ...
|
async def handler(event): ...
|
||||||
|
|
||||||
# equivalent to:
|
# equivalent to:
|
||||||
|
|
||||||
@bot.on(events.NewMessage, Command('/start') & Text(r'\bdata:\w+'))
|
@bot.on(events.NewMessage, Command('/start') & Text(r'\\bdata:\\w+'))
|
||||||
async def handler(event): ...
|
async def handler(event): ...
|
||||||
|
|
||||||
:param filter1: The first filter to check.
|
:param filter1: The first filter to check.
|
||||||
|
@ -14,7 +14,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
class ButtonCallback(Event):
|
class ButtonCallback(Event):
|
||||||
"""
|
"""
|
||||||
Occurs when the user :meth:`~telethon.types.buttons.Callback.click`\ s a :class:`~telethon.types.buttons.Callback` button.
|
Occurs when the user :meth:`~telethon.types.buttons.Callback.click`\\ s a :class:`~telethon.types.buttons.Callback` button.
|
||||||
|
|
||||||
Only bot accounts can receive this event, because only bots can send :class:`~telethon.types.buttons.Callback` buttons.
|
Only bot accounts can receive this event, because only bots can send :class:`~telethon.types.buttons.Callback` buttons.
|
||||||
"""
|
"""
|
||||||
|
@ -25,7 +25,7 @@ class AsyncList(abc.ABC, Generic[T]):
|
|||||||
|
|
||||||
.. rubric:: Example
|
.. rubric:: Example
|
||||||
|
|
||||||
:meth:`telethon.Client.get_messages` returns an :class:`AsyncList`\ [:class:`Message`].
|
:meth:`telethon.Client.get_messages` returns an :class:`AsyncList`\\ [:class:`Message`].
|
||||||
This means:
|
This means:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
@ -96,7 +96,7 @@ class Connector(Protocol):
|
|||||||
* The ``ip`` address as a :class:`str`. This might be either a IPv4 or IPv6.
|
* The ``ip`` address as a :class:`str`. This might be either a IPv4 or IPv6.
|
||||||
* The ``port`` as a :class:`int`. This will be a number below 2¹⁶, often 443.
|
* The ``port`` as a :class:`int`. This will be a number below 2¹⁶, often 443.
|
||||||
|
|
||||||
and returns a :class:`tuple`\ [:class:`AsyncReader`, :class:`AsyncWriter`].
|
and returns a :class:`tuple`\\ [:class:`AsyncReader`, :class:`AsyncWriter`].
|
||||||
|
|
||||||
You can use a custom connector to connect to Telegram through proxies.
|
You can use a custom connector to connect to Telegram through proxies.
|
||||||
The library will only ever open remote connections through this function.
|
The library will only ever open remote connections through this function.
|
||||||
|
Loading…
Reference in New Issue
Block a user