Skip to content

Commit

Permalink
Replace http links to PTB wiki with extlinks (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemontree210 committed Dec 18, 2022
1 parent 33fd250 commit 475f188
Show file tree
Hide file tree
Showing 40 changed files with 107 additions and 175 deletions.
12 changes: 5 additions & 7 deletions telegram/_bot.py
Expand Up @@ -149,10 +149,8 @@ class Bot(TelegramObject, AbstractAsyncContextManager):
.. seealso:: :attr:`telegram.ext.Application.bot`,
:attr:`telegram.ext.CallbackContext.bot`,
:attr:`telegram.ext.Updater.bot`,
`Your First Bot <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Extensions-–-Your-first-Bot>`_,
`Builder Pattern <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Builder-Pattern>`_
:wiki:`Your First Bot <Extensions-–-Your-first-Bot>`,
:wiki:`Builder Pattern <Builder-Pattern>`
.. versionadded:: 13.2
Objects of this class are comparable in terms of equality. Two objects of this class are
Expand Down Expand Up @@ -3568,9 +3566,9 @@ async def set_webhook(
integration.
certificate (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`):
Upload your public key certificate so that the root
certificate in use can be checked. See our `self-signed guide <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Webhooks#creating-a-self-signed-\
certificate-using-openssl>`_ for details. |uploadinputnopath|
certificate in use can be checked. See our :wiki:`self-signed guide\
<Webhooks#creating-a-self-signed-certificate-using-openssl>` for details.
|uploadinputnopath|
ip_address (:obj:`str`, optional): The fixed IP address which will be used to send
webhook requests instead of the IP address resolved through DNS.
max_connections (:obj:`int`, optional): Maximum allowed number of simultaneous HTTPS
Expand Down
2 changes: 1 addition & 1 deletion telegram/_chatmember.py
Expand Up @@ -45,7 +45,7 @@ class ChatMember(TelegramObject):
considered equal, if their :attr:`user` and :attr:`status` are equal.
Examples:
:any:`Chat Member Bot <examples.chatmemberbot>`
:any:`Chat Member Bot <examples.chatmemberbot>`
.. versionchanged:: 20.0
Expand Down
4 changes: 2 additions & 2 deletions telegram/_dice.py
Expand Up @@ -52,8 +52,8 @@ class Dice(TelegramObject):
If :attr:`emoji` is :tg-const:`telegram.Dice.SLOT_MACHINE`, each value
corresponds to a unique combination of symbols, which
can be found at our `wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Code-snippets#map-a-slot-machine-dice-value-to-the-corresponding-symbols>`_.
can be found in our
:wiki:`wiki <Code-snippets#map-a-slot-machine-dice-value-to-the-corresponding-symbols>`.
However, this behaviour is undocumented and might be changed by Telegram.
..
Expand Down
3 changes: 1 addition & 2 deletions telegram/_inline/inlinekeyboardbutton.py
Expand Up @@ -95,8 +95,7 @@ class InlineKeyboardButton(TelegramObject):
Tip:
The value entered here will be available in :attr:`telegram.CallbackQuery.data`.
.. seealso:: `Arbitrary callback_data <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Arbitrary-callback_data>`_
.. seealso:: :wiki:`Arbitrary callback_data <Arbitrary-callback_data>`
web_app (:obj:`telegram.WebAppInfo`, optional): Description of the `Web App
<https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses
Expand Down
3 changes: 1 addition & 2 deletions telegram/_update.py
Expand Up @@ -46,8 +46,7 @@ class Update(TelegramObject):
Note:
At most one of the optional parameters can be present in any given update.
.. seealso:: `Your First Bot <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Extensions-–-Your-first-Bot>`_
.. seealso:: :wiki:`Your First Bot <Extensions-–-Your-first-Bot>`
Args:
update_id (:obj:`int`): The update's unique identifier. Update identifiers start from a
Expand Down
8 changes: 3 additions & 5 deletions telegram/error.py
Expand Up @@ -59,8 +59,7 @@ class TelegramError(Exception):
"""
Base class for Telegram errors.
.. seealso:: `Exceptions, Warnings and Logging <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Exceptions%2C-Warnings-and-Logging>`_
.. seealso:: :wiki:`Exceptions, Warnings and Logging <Exceptions%2C-Warnings-and-Logging>`
"""

__slots__ = ("message",)
Expand Down Expand Up @@ -149,9 +148,8 @@ class ChatMigrated(TelegramError):
"""
Raised when the requested group chat migrated to supergroup and has a new chat id.
.. seealso:: `Storing Bot, User and Chat Related Data <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-\
chat-related-data>`_,
.. seealso::
:wiki:`Storing Bot, User and Chat Related Data <Storing-bot%2C-user-and-chat-related-data>`
Args:
new_chat_id (:obj:`int`): The new chat id of the group.
Expand Down
3 changes: 1 addition & 2 deletions telegram/ext/_aioratelimiter.py
Expand Up @@ -90,8 +90,7 @@ class AIORateLimiter(BaseRateLimiter[int]):
welcome you to implement your own subclass of :class:`~telegram.ext.BaseRateLimiter`.
Feel free to check out the source code of this class for inspiration.
.. seealso:: `Avoiding Flood Limits <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Avoiding-flood-limits>`_
.. seealso:: :wiki:`Avoiding Flood Limits <Avoiding-flood-limits>`
.. versionadded:: 20.0
Expand Down
29 changes: 10 additions & 19 deletions telegram/ext/_application.py
Expand Up @@ -136,10 +136,8 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AbstractAsyncContextManager)
Examples:
:any:`Echo Bot <examples.echobot>`
.. seealso:: `Your First Bot <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Extensions-–-Your-first-Bot>`_,
`Architecture Overview <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Architecture>`_
.. seealso:: :wiki:`Your First Bot <Extensions-–-Your-first-Bot>`,
:wiki:`Architecture Overview <Architecture>`
.. versionchanged:: 20.0
Expand Down Expand Up @@ -338,8 +336,7 @@ def concurrent_updates(self) -> int:
""":obj:`int`: The number of concurrent updates that will be processed in parallel. A
value of ``0`` indicates updates are *not* being processed concurrently.
.. seealso:: `Concurrency <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Concurrency>`_
.. seealso:: :wiki:`Concurrency`
"""
return self._concurrent_updates

Expand All @@ -349,8 +346,7 @@ def job_queue(self) -> Optional["JobQueue"]:
:class:`telegram.ext.JobQueue`: The :class:`JobQueue` used by the
:class:`telegram.ext.Application`.
.. seealso:: `Job Queue <https://github.com/python-telegram-bot/
python-telegram-bot/wiki/Extensions-%E2%80%93-JobQueue>`_
.. seealso:: :wiki:`Job Queue <Extensions-%E2%80%93-JobQueue>`
"""
if self._job_queue is None:
warn(
Expand Down Expand Up @@ -763,8 +759,7 @@ def run_webhook(
.. seealso::
:meth:`initialize`, :meth:`start`, :meth:`stop`, :meth:`shutdown`
:meth:`telegram.ext.Updater.start_webhook`, :meth:`telegram.ext.Updater.stop`,
:meth:`run_polling`,
`Webhooks <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Webhooks>`_
:meth:`run_polling`, :wiki:`Webhooks`
Args:
listen (:obj:`str`, optional): IP-Address to listen on. Defaults to
Expand Down Expand Up @@ -909,8 +904,7 @@ def create_task(self, coroutine: Coroutine, update: object = None) -> asyncio.Ta
* If the application is currently running, tasks created by this method will be
awaited with :meth:`stop`.
.. seealso:: `Concurrency <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Concurrency>`_
.. seealso:: :wiki:`Concurrency`
Args:
coroutine (:term:`coroutine function`): The coroutine to run as task.
Expand Down Expand Up @@ -1028,8 +1022,7 @@ async def process_update(self, update: object) -> None:
"""Processes a single update and marks the update to be updated by the persistence later.
Exceptions raised by handler callbacks will be processed by :meth:`process_update`.
.. seealso:: `Concurrency <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Concurrency>`_
.. seealso:: :wiki:`Concurrency`
.. versionchanged:: 20.0
Persistence is now updated in an interval set by
Expand Down Expand Up @@ -1270,9 +1263,8 @@ def migrate_chat_data(
to the asynchronous nature of these features. Please make sure that your program can
avoid or handle such situations.
.. seealso:: `Storing Bot, User and Chat Related Data <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-\
chat-related-data>`_,
.. seealso:: :wiki:`Storing Bot, User and Chat Related Data\
<Storing-bot%2C-user-and-chat-related-data>`
Args:
message (:class:`telegram.Message`, optional): A message with either
Expand Down Expand Up @@ -1495,8 +1487,7 @@ def add_error_handler(
Examples:
:any:`Errorhandler Bot <examples.errorhandlerbot>`
.. seealso:: `Exceptions, Warnings and Logging <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Exceptions%2C-Warnings-and-Logging>`_
.. seealso:: :wiki:`Exceptions, Warnings and Logging <Exceptions%2C-Warnings-and-Logging>`
Args:
callback (:term:`coroutine function`): The callback function for this error handler.
Expand Down
51 changes: 26 additions & 25 deletions telegram/ext/_applicationbuilder.py
Expand Up @@ -112,10 +112,8 @@ class ApplicationBuilder(Generic[BT, CCT, UD, CD, BD, JQ]):
* Unless a custom :class:`telegram.Bot` instance is set via :meth:`bot`, :meth:`build` will
use :class:`telegram.ext.ExtBot` for the bot.
.. seealso:: `Your First Bot <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Extensions-–-Your-first-Bot>`_,
`Builder Pattern for Application <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Builder-Pattern>`_
.. seealso:: :wiki:`Your First Bot <Extensions-–-Your-first-Bot>`,
:wiki:`Builder Pattern <Builder-Pattern>`
.. _`builder pattern`: https://en.wikipedia.org/wiki/Builder_pattern
"""
Expand Down Expand Up @@ -359,9 +357,8 @@ def base_url(self: BuilderType, base_url: str) -> BuilderType:
"""Sets the base URL for :attr:`telegram.ext.Application.bot`. If not called,
will default to ``'https://api.telegram.org/bot'``.
.. seealso:: :paramref:`telegram.Bot.base_url`, `Local Bot API Server <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Local-Bot-API-Server>`_,
:meth:`base_file_url`
.. seealso:: :paramref:`telegram.Bot.base_url`,
:wiki:`Local Bot API Server <Local-Bot-API-Server>`, :meth:`base_file_url`
Args:
base_url (:obj:`str`): The URL.
Expand All @@ -378,9 +375,8 @@ def base_file_url(self: BuilderType, base_file_url: str) -> BuilderType:
"""Sets the base file URL for :attr:`telegram.ext.Application.bot`. If not
called, will default to ``'https://api.telegram.org/file/bot'``.
.. seealso:: :paramref:`telegram.Bot.base_file_url`, `Local Bot API Server <https://\
github.com/python-telegram-bot/python-telegram-bot/wiki/Local-Bot-API-Server>`_,
:meth:`base_url`
.. seealso:: :paramref:`telegram.Bot.base_file_url`,
:wiki:`Local Bot API Server <Local-Bot-API-Server>`, :meth:`base_url`
Args:
base_file_url (:obj:`str`): The URL.
Expand Down Expand Up @@ -673,8 +669,10 @@ def private_key(
"""Sets the private key and corresponding password for decryption of telegram passport data
for :attr:`telegram.ext.Application.bot`.
.. seealso:: :any:`examples.passportbot`, `Telegram Passports
<https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport>`_
Examples:
:any:`Passport Bot <examples.passportbot>`
.. seealso:: :wiki:`Telegram Passports <Telegram-Passport>`
Args:
private_key (:obj:`bytes` | :obj:`str` | :obj:`pathlib.Path`): The private key or the
Expand Down Expand Up @@ -704,8 +702,7 @@ def defaults(self: BuilderType, defaults: "Defaults") -> BuilderType:
"""Sets the :class:`telegram.ext.Defaults` instance for
:attr:`telegram.ext.Application.bot`.
.. seealso:: `Adding Defaults <https://github.com/python-telegram-bot/python-telegram-bot\
/wiki/Adding-defaults-to-your-bot>`_
.. seealso:: :wiki:`Adding Defaults to Your Bot <Adding-defaults-to-your-bot>`
Args:
defaults (:class:`telegram.ext.Defaults`): The defaults instance.
Expand Down Expand Up @@ -734,9 +731,10 @@ def arbitrary_callback_data(
pip install python-telegram-bot[callback-data]
.. seealso:: `Arbitrary callback_data <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Arbitrary-callback_data>`_,
:any:`examples.arbitrarycallbackdatabot`
Examples:
:any:`Arbitrary callback_data Bot <examples.arbitrarycallbackdatabot>`
.. seealso:: :wiki:`Arbitrary callback_data <Arbitrary-callback_data>`
Args:
arbitrary_callback_data (:obj:`bool` | :obj:`int`): If :obj:`True` is passed, the
Expand All @@ -756,8 +754,7 @@ def local_mode(self: BuilderType, local_mode: bool) -> BuilderType:
:attr:`telegram.ext.Application.bot`.
If not called, will default to :obj:`False`.
.. seealso:: `Local Bot API Server <https://github.com/python-telegram-bot/\
python-telegram-bot/wiki/Local-Bot-API-Server>`_,
.. seealso:: :wiki:`Local Bot API Server <Local-Bot-API-Server>`
Args:
local_mode (:obj:`bool`): Whether the bot should run in local mode.
Expand Down Expand Up @@ -842,8 +839,10 @@ def job_queue(
:attr:`telegram.ext.Application.job_queue`. If not called, a job queue will be
instantiated if the requirements of :class:`telegram.ext.JobQueue` are installed.
.. seealso:: `JobQueue <https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Extensions-%E2%80%93-JobQueue>`_, :any:`examples.timerbot`
Examples:
:any:`Timer Bot <examples.timerbot>`
.. seealso:: :wiki:`Job Queue <Extensions-%E2%80%93-JobQueue>`
Note:
* :meth:`telegram.ext.JobQueue.set_application` will be called automatically by
Expand Down Expand Up @@ -878,9 +877,10 @@ def persistence(self: BuilderType, persistence: "BasePersistence") -> BuilderTyp
:func:`copy.deepcopy`. This is due to the data being deep copied before handing it over
to the persistence in order to avoid race conditions.
.. seealso:: `Making your bot persistent <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Making-your-bot-persistent>`_,
:any:`examples.persistentconversationbot`
Examples:
:any:`Persistent Conversation Bot <examples.persistentconversationbot>`
.. seealso:: :wiki:`Making Your Bot Persistent <Making-your-bot-persistent>`
Warning:
If a :class:`telegram.ext.ContextTypes` instance is set via :meth:`context_types`,
Expand All @@ -902,7 +902,8 @@ def context_types(
"""Sets a :class:`telegram.ext.ContextTypes` instance for
:attr:`telegram.ext.Application.context_types`.
.. seealso:: :any:`examples.contexttypesbot`
Examples:
:any:`Context Types Bot <examples.contexttypesbot>`
Args:
context_types (:class:`telegram.ext.ContextTypes`): The context types.
Expand Down
6 changes: 2 additions & 4 deletions telegram/ext/_basepersistence.py
Expand Up @@ -111,10 +111,8 @@ class BasePersistence(Generic[UD, CD, BD], ABC):
type of the argument of :meth:`refresh_bot_data` and the return value of
:meth:`get_bot_data`.
.. seealso:: `Architecture Overview <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Architecture>`_,
`Making Your Bot Persistent <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Making-your-bot-persistent>`_
.. seealso:: :wiki:`Architecture Overview <Architecture>`,
:wiki:`Making Your Bot Persistent <Making-your-bot-persistent>`
.. versionchanged:: 20.0
Expand Down
6 changes: 2 additions & 4 deletions telegram/ext/_baseratelimiter.py
Expand Up @@ -37,10 +37,8 @@ class BaseRateLimiter(ABC, Generic[RLARGS]):
Hint:
Requests to :meth:`~telegram.Bot.get_updates` are never rate limited.
.. seealso:: `Architecture Overview <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Architecture>`_,
`Avoiding Flood Limits <https://github.com/\
python-telegram-bot/python-telegram-bot/wiki/Avoiding-flood-limits>`_
.. seealso:: :wiki:`Architecture Overview <Architecture>`,
:wiki:`Avoiding Flood Limits <Avoiding-flood-limits>`
.. versionadded:: 20.0
"""
Expand Down

0 comments on commit 475f188

Please sign in to comment.