From 7f88238d8f631e8ec683b47323e76be1c75cbb83 Mon Sep 17 00:00:00 2001
From: Lonami Exo
Date: Thu, 9 May 2019 14:09:22 +0200
Subject: [PATCH] Update external links to the documentation
---
README.rst | 2 +-
readthedocs/basic/signing-in.rst | 2 +-
readthedocs/quick-references/faq.rst | 6 +++---
telethon/client/users.py | 2 +-
telethon_examples/README.md | 2 +-
telethon_examples/assistant.py | 8 ++++----
telethon_generator/data/html/core.html | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/README.rst b/README.rst
index b8cb0a2b..7364e32f 100755
--- a/README.rst
+++ b/README.rst
@@ -75,7 +75,7 @@ useful information.
.. _asyncio: https://docs.python.org/3/library/asyncio.html
.. _MTProto: https://core.telegram.org/mtproto
.. _Telegram: https://telegram.org
-.. _Compatibility and Convenience: https://telethon.readthedocs.io/en/latest/extra/basic/compatibility-and-convenience.html
+.. _Compatibility and Convenience: https://telethon.readthedocs.io/en/latest/misc/compatibility-and-convenience.html
.. _Read The Docs: https://telethon.readthedocs.io
.. |logo| image:: logo.svg
diff --git a/readthedocs/basic/signing-in.rst b/readthedocs/basic/signing-in.rst
index a0b3faa3..fdf21832 100644
--- a/readthedocs/basic/signing-in.rst
+++ b/readthedocs/basic/signing-in.rst
@@ -119,7 +119,7 @@ with
TelegramClient('anon', api_id, api_hash, proxy=(socks.SOCKS5, '127.0.0.1', 4444))
-(of course, replacing the IP and port with the IP and port of the proxye).
+(of course, replacing the IP and port with the IP and port of the proxy).
The ``proxy=`` argument should be a tuple, a list or a dict,
consisting of parameters described `in PySocks usage`__.
diff --git a/readthedocs/quick-references/faq.rst b/readthedocs/quick-references/faq.rst
index 0363a873..4bf68bb1 100644
--- a/readthedocs/quick-references/faq.rst
+++ b/readthedocs/quick-references/faq.rst
@@ -47,12 +47,12 @@ And except them as such:
.. code-block:: python
- import time
try:
client.send_message(chat, 'Hi')
- except FloodWaitError as e:
+ except errors.FloodWaitError as e:
+ # e.seconds is how many seconds you have
+ # to wait before making the request again.
print('Flood for', e.seconds)
- time.sleep(e.seconds)
My account was deleted/limited when using the library
diff --git a/telethon/client/users.py b/telethon/client/users.py
index 3ad3564c..0600635f 100644
--- a/telethon/client/users.py
+++ b/telethon/client/users.py
@@ -394,7 +394,7 @@ class UserMethods(TelegramBaseClient):
raise ValueError(
'Could not find the input entity for {!r}. Please read https://'
- 'telethon.readthedocs.io/en/latest/extra/basic/entities.html to'
+ 'telethon.readthedocs.io/en/latest/concepts/entities.html to'
' find out more details.'
.format(peer)
)
diff --git a/telethon_examples/README.md b/telethon_examples/README.md
index 21b7d988..b210e16c 100644
--- a/telethon_examples/README.md
+++ b/telethon_examples/README.md
@@ -116,4 +116,4 @@ assumes some [`asyncio`] knowledge, but otherwise is easy to follow.
[`asyncio`]: https://docs.python.org/3/library/asyncio.html
[`tkinter`]: https://docs.python.org/3/library/tkinter.html
[tkinter GUI]: https://raw.githubusercontent.com/LonamiWebs/Telethon/master/telethon_examples/screenshot-gui.jpg
-[`events.NewMessage`]: https://telethon.readthedocs.io/en/stable/telethon.events.html#telethon.events.newmessage.NewMessage
+[`events.NewMessage`]: https://telethon.readthedocs.io/en/latest/modules/events.html#telethon.events.newmessage.NewMessage
diff --git a/telethon_examples/assistant.py b/telethon_examples/assistant.py
index 586b55a7..8321157f 100644
--- a/telethon_examples/assistant.py
+++ b/telethon_examples/assistant.py
@@ -55,7 +55,7 @@ WELCOME = {
READ_FULL = (
'Please read [Accessing the Full API](https://telethon.readthedocs.io'
- '/en/latest/extra/advanced-usage/accessing-the-full-api.html)'
+ '/en/latest/concepts/full-api.html)'
)
SEARCH = (
@@ -68,12 +68,12 @@ RTD = '[Read The Docs!](https://telethon.readthedocs.io)'
RTFD = '[Read The F* Docs!](https://telethon.readthedocs.io)'
UPDATES = (
'Check out [Working with Updates](https://telethon.readthedocs.io'
- '/en/latest/extra/basic/working-with-updates.html) in the documentation.'
+ '/en/latest/basic/updates.html) in the documentation.'
)
-DOCS_CLIENT = 'https://telethon.readthedocs.io/en/latest/telethon.client.html#'
+DOCS_CLIENT = 'https://telethon.readthedocs.io/en/latest/modules/client.html#'
DOCS_MESSAGE = (
'https://telethon.readthedocs.io/en/latest/'
- 'telethon.tl.custom.html#telethon.tl.custom.message.Message.'
+ 'modules/custom.html#telethon.tl.custom.message.Message.'
)
SPAM = (
diff --git a/telethon_generator/data/html/core.html b/telethon_generator/data/html/core.html
index 0729b672..cf759b85 100644
--- a/telethon_generator/data/html/core.html
+++ b/telethon_generator/data/html/core.html
@@ -59,7 +59,7 @@ users.getUsers#0d91a548 id:Vector<InputUser> = Vector<User>
This is not Python code. It's the "TL definition". It's
an easy-to-read line that gives a quick overview on the parameters
and its result. You don't need to worry about this. See
- Understanding
+ Understanding
the Type Language for more details on it.
Index
@@ -175,7 +175,7 @@ users.getUsers#0d91a548 id:Vector<InputUser> = Vector<User>
not always run. They are just there to show the right syntax.
You should check out
- how
+ how
to access the full API in ReadTheDocs.