From b4f0f411bd5f7b2c491faab59ad5f9d2e999debc Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 23 Jun 2019 01:32:04 +0200 Subject: [PATCH] Small documentation fixes --- docs/source/faq.rst | 6 +- docs/source/index.rst | 174 +++++++++++++++++++++--------------------- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 335f4bc6..f76f1790 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -68,7 +68,7 @@ To challenge the framework, the creator is constantly keeping a public `welcome bot `_ online 24/7 on his own, relatively-busy account for well over a year now. -In addition to that, about six months ago, one of the most popular Telegram bot has been rewritten +In addition to that, about six months ago, one of the most popular Telegram bot has been rewritten from scratch :doc:`using Pyrogram ` and is serving more than 200,000 Monthly Active Users since then, uninterruptedly and without any need for restarting it. @@ -134,8 +134,8 @@ If you -- even accidentally -- fail to do so, all the previous session copies wi and eventually the server will start throwing the error ``[406 AUTH_KEY_DUPLICATED]``, inviting you to login again. Why is that so? Because the server has recognized two identical sessions are running in two different locations, and -concludes it could possibly be due to a cloned/stolen device. Having the session ended in such occasions will protect -the user's privacy. +concludes it could possibly be due to a cloned/stolen device. Having the session terminated in such occasions will +protect the user's privacy. So, the only correct way to run multiple clients on the same account is authorizing your account (either user or bot) from the beginning every time, and use one separate session for each parallel client you are going to use. diff --git a/docs/source/index.rst b/docs/source/index.rst index b9682827..66722690 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,93 +1,6 @@ Welcome to Pyrogram =================== -.. raw:: html - -
- -
Pyrogram Logo
-
-
- -

- Telegram MTProto API Framework for Python - -
- - Source Code - - • - - Releases - - • - - Community - -

- -.. code-block:: python - - from pyrogram import Client, Filters - - app = Client("my_account") - - - @app.on_message(Filters.private) - def hello(client, message): - message.reply("Hello {}".format(message.from_user.first_name)) - - - app.run() - -**Pyrogram** is an elegant, easy-to-use Telegram_ client library and framework written from the ground up in Python and -C. It enables you to easily create custom apps for both user and bot identities (bot API alternative) via the -:doc:`MTProto API `. - -.. _Telegram: https://telegram.org - -How the Documentation is Organized ----------------------------------- - -Contents are organized into self-contained topics and can be all accessed from the sidebar, or by following them in -order using the :guilabel:`Next` button at the end of each page. Here below you can, instead, find a list of the most -relevant pages for a quick access. - -First Steps ------------ - -.. hlist:: - :columns: 2 - - - :doc:`Quick Start `: Overview to get you started quickly. - - :doc:`Calling Methods `: How to call Pyrogram's methods. - - :doc:`Handling Updates `: How to handle Telegram updates. - - :doc:`Error Handling `: How to handle API errors correctly. - -API Reference -------------- - -.. hlist:: - :columns: 2 - - - :doc:`Pyrogram Client `: Reference details about the Client class. - - :doc:`Available Methods `: List of available high-level methods. - - :doc:`Available Types `: List of available high-level types. - - :doc:`Bound Methods `: List of convenient bound methods. - -Meta ----- - -.. hlist:: - :columns: 2 - - - :doc:`Pyrogram FAQ `: Answers to common Pyrogram questions. - - :doc:`Pyrogram Glossary `: List of words with brief explanations. - - :doc:`Powered by Pyrogram `: Collection of Pyrogram Projects. - - :doc:`Support Pyrogram `: Ways to show your appreciation. - - :doc:`About the License `: Information about the Project license. - - :doc:`Release Notes `: Release notes for Pyrogram releases. - .. toctree:: :hidden: :caption: Introduction @@ -159,4 +72,91 @@ Meta telegram/functions/index telegram/types/index +.. raw:: html + +
+ +
Pyrogram Logo
+
+
+ +

+ Telegram MTProto API Framework for Python + +
+ + Source Code + + • + + Releases + + • + + Community + +

+ +.. code-block:: python + + from pyrogram import Client, Filters + + app = Client("my_account") + + + @app.on_message(Filters.private) + def hello(client, message): + message.reply("Hello {}".format(message.from_user.first_name)) + + + app.run() + +**Pyrogram** is an elegant, easy-to-use Telegram_ client library and framework written from the ground up in Python and +C. It enables you to easily create custom apps for both user and bot identities (bot API alternative) via the +:doc:`MTProto API `. + +.. _Telegram: https://telegram.org + +How the Documentation is Organized +---------------------------------- + +Contents are organized into self-contained topics and can be all accessed from the sidebar, or by following them in +order using the :guilabel:`Next` button at the end of each page. Here below you can, instead, find a list of the most +relevant pages for a quick access. + +First Steps +^^^^^^^^^^^ + +.. hlist:: + :columns: 2 + + - :doc:`Quick Start `: Overview to get you started quickly. + - :doc:`Calling Methods `: How to call Pyrogram's methods. + - :doc:`Handling Updates `: How to handle Telegram updates. + - :doc:`Error Handling `: How to handle API errors correctly. + +API Reference +^^^^^^^^^^^^^ + +.. hlist:: + :columns: 2 + + - :doc:`Pyrogram Client `: Reference details about the Client class. + - :doc:`Available Methods `: List of available high-level methods. + - :doc:`Available Types `: List of available high-level types. + - :doc:`Bound Methods `: List of convenient bound methods. + +Meta +^^^^ + +.. hlist:: + :columns: 2 + + - :doc:`Pyrogram FAQ `: Answers to common Pyrogram questions. + - :doc:`Pyrogram Glossary `: List of words with brief explanations. + - :doc:`Powered by Pyrogram `: Collection of Pyrogram Projects. + - :doc:`Support Pyrogram `: Ways to show your appreciation. + - :doc:`About the License `: Information about the Project license. + - :doc:`Release Notes `: Release notes for Pyrogram releases. + Last updated on |today| \ No newline at end of file