Skip to content

Replacing git.io links #2872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ body:
value: |
Hey there, you have a question? We are happy to answer. Please make sure no similar question was opened already.

To make it easier for us to help you, please read this [article](https://git.io/JURJO).
To make it easier for us to help you, please read this [article](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Ask-Right).

Please mind that there is also a users' [Telegram group](https://t.me/pythontelegrambotgroup) for questions about the library. Questions asked there might be answered quicker than here. Moreover, [GitHub Discussions](https://git.io/JG3rk) offer a slightly better format to discuss usage questions.
Please mind that there is also a users' [Telegram group](https://t.me/pythontelegrambotgroup) for questions about the library. Questions asked there might be answered quicker than here. Moreover, [GitHub Discussions](https://github.com/python-telegram-bot/python-telegram-bot/discussions) offer a slightly better format to discuss usage questions.

- type: textarea
id: issue-faced
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ Expect minor releases soon (mainly complete Bot API 4.4 support)
- Error Handler now handles all types of exceptions (`#1485`_)
- Return UTC from from_timestamp() (`#1485`_)

**See the wiki page at https://git.io/fxJuV for a detailed guide on how to migrate from version 11 to version 12.**
**See the wiki page at https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-12.0 for a detailed guide on how to migrate from version 11 to version 12.**

Context based callbacks (`#1100`_)
----------------------------------
Expand Down Expand Up @@ -1088,7 +1088,7 @@ Non Bot API 4.0 changes:
.. _`#1172`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1172
.. _`#1179`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1179
.. _`#1184`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1184
.. _`our telegram passport wiki page`: https://git.io/fAvYd
.. _`our telegram passport wiki page`: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport

Version 10.1.0
==============
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Generated by https://darkreader.org
Instructions: Install the extension on a Chromium-based browser
Then do this to export the CSS: https://git.io/JOM6t and drop it here
Then do this to export the CSS: https://github.com/darkreader/darkreader/issues/604#issuecomment-661107893 and drop it here
Some color values where manually changed - just search for "/*" in this file and insert them in the new css
*/
/* User-Agent Style */
Expand Down
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A even more complex example of a bot that uses the nested `ConversationHandler`s
A basic example of a bot store conversation state and user_data over multiple restarts.

### [`inlinekeyboard.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard.py)
This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives at https://git.io/JOmFw.
This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives [here](https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example).

### [`inlinekeyboard2.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard2.py)
A more complex example about inline keyboards, callback queries and message editing. This example showcases how an interactive menu could be build using inline keyboards.
Expand All @@ -40,7 +40,7 @@ A basic example of an [inline bot](https://core.telegram.org/bots/inline). Don't
This example sheds some light on polls, poll answers and the corresponding handlers.

### [`passportbot.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/passportbot.py)
A basic example of a bot that can accept passports. Use in combination with [`passportbot.html`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/passportbot.html). Don't forget to enable and configure payments with [@BotFather](https://telegram.me/BotFather). Check out this [guide](https://git.io/fAvYd) on Telegram passports in PTB.
A basic example of a bot that can accept passports. Use in combination with [`passportbot.html`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/passportbot.html). Don't forget to enable and configure payments with [@BotFather](https://telegram.me/BotFather). Check out this [guide](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport) on Telegram passports in PTB.

### [`paymentbot.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/paymentbot.py)
A basic example of a bot that can accept payments. Don't forget to enable and configure payments with [@BotFather](https://telegram.me/BotFather).
Expand Down
3 changes: 2 additions & 1 deletion examples/arbitrarycallbackdatabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

"""This example showcases how PTBs "arbitrary callback data" feature can be used.

For detailed info on arbitrary callback data, see the wiki page at https://git.io/JGBDI
For detailed info on arbitrary callback data, see the wiki page at
https://github.com/python-telegram-bot/python-telegram-bot/wiki/Arbitrary-callback_data
"""
import logging
from typing import List, Tuple, cast
Expand Down
2 changes: 1 addition & 1 deletion examples/inlinekeyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"""
Basic example for a bot that uses inline keyboards. For an in-depth explanation, check out
https://git.io/JOmFw.
https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example.
"""
import logging

Expand Down
3 changes: 2 additions & 1 deletion examples/passportbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

See https://telegram.org/blog/passport for info about what telegram passport is.

See https://git.io/fAvYd for how to use Telegram Passport properly with python-telegram-bot.
See https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport
for how to use Telegram Passport properly with python-telegram-bot.

"""
import logging
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_setup_kwargs(raw=False):
author_email='devs@python-telegram-bot.org',
license='LGPLv3',
url='https://python-telegram-bot.org/',
# Keywords supported by PyPI can be found at https://git.io/JtLIZ
# Keywords supported by PyPI can be found at https://github.com/pypa/warehouse/blob/aafc5185e57e67d43487ce4faa95913dd4573e14/warehouse/templates/packaging/detail.html#L20-L58
project_urls={
"Documentation": "https://python-telegram-bot.readthedocs.io",
"Bug Tracker": "https://github.com/python-telegram-bot/python-telegram-bot/issues",
Expand Down
5 changes: 3 additions & 2 deletions telegram/_dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ class Dice(TelegramObject):
Telegram.

If :attr:`emoji` is "🎰", each value corresponds to a unique combination of symbols, which
can be found at our `wiki <https://git.io/JkeC6>`_. However, this behaviour is undocumented
and might be changed by Telegram.
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>`_.
However, this behaviour is undocumented and might be changed by Telegram.

Args:
value (:obj:`int`): Value of the dice. 1-6 for dice, darts and bowling balls, 1-5 for
Expand Down
50 changes: 34 additions & 16 deletions telegram/ext/_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ def private_key(
to be used for :attr:`telegram.ext.Dispatcher.bot`.

.. seealso:: `passportbot.py <https://github.com/python-telegram-bot/python-telegram-bot\
/tree/master/examples#passportbotpy>`_, `Telegram Passports <https://git.io/fAvYd>`_
/tree/master/examples#passportbotpy>`_, `Telegram Passports <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Telegram-Passport>`_

Args:
private_key (:obj:`bytes` | :obj:`str` | :obj:`pathlib.Path`): The private key or the
Expand All @@ -645,7 +646,8 @@ def defaults(self: BuilderType, defaults: 'Defaults') -> BuilderType:
"""Sets the :class:`telegram.ext.Defaults` object to be used for
:attr:`telegram.ext.Dispatcher.bot`.

.. seealso:: `Adding Defaults <https://git.io/J0FGR>`_
.. seealso:: `Adding Defaults <https://github.com/python-telegram-bot/python-telegram-bot\
/wiki/Adding-defaults-to-your-bot>`_

Args:
defaults (:class:`telegram.ext.Defaults`): The defaults.
Expand All @@ -663,8 +665,10 @@ def arbitrary_callback_data(
cached in memory. If not called, only strings can be used as callback data and no data will
be stored in memory.

.. seealso:: `Arbitrary callback_data <https://git.io/JGBDI>`_,
`arbitrarycallbackdatabot.py <https://git.io/J0FBv>`_
.. seealso:: `Arbitrary callback_data <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Arbitrary-callback_data>`_,
`arbitrarycallbackdatabot.py <https://github.com/python-telegram-bot\
/python-telegram-bot/tree/master/examples#arbitrarycallbackdatabotpy>`_

Args:
arbitrary_callback_data (:obj:`bool` | :obj:`int`): If :obj:`True` is passed, the
Expand Down Expand Up @@ -750,7 +754,9 @@ def job_queue(
"""Sets a :class:`telegram.ext.JobQueue` instance to be used for
:attr:`telegram.ext.Dispatcher.job_queue`. If not called, a job queue will be instantiated.

.. seealso:: `JobQueue <https://git.io/J0FCN>`_, `timerbot.py <https://git.io/J0FWf>`_
.. seealso:: `JobQueue <https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Extensions-%E2%80%93-JobQueue>`_, `timerbot.py <https://github.com\
/python-telegram-bot/python-telegram-bot/tree/master/examples#timerbotpy>`_

Note:
* :meth:`telegram.ext.JobQueue.set_dispatcher` will be called automatically by
Expand Down Expand Up @@ -778,8 +784,10 @@ def persistence(
"""Sets a :class:`telegram.ext.BasePersistence` instance to be used for
:attr:`telegram.ext.Dispatcher.persistence`.

.. seealso:: `Making your bot persistent <https://git.io/J0FWM>`_,
`persistentconversationbot.py <https://git.io/J0FW7>`_
.. seealso:: `Making your bot persistent <https://github.com/python-telegram-bot/python-telegram-bot\
/wiki/Making-your-bot-persistent>`_,
`persistentconversationbot.py <https://github.com/python-telegram-bot/python-telegram-bot/tree\
/master/examples#persistentconversationbotpy>`_

Warning:
If a :class:`telegram.ext.ContextTypes` instance is set via :meth:`context_types`,
Expand All @@ -801,7 +809,8 @@ def context_types(
"""Sets a :class:`telegram.ext.ContextTypes` instance to be used for
:attr:`telegram.ext.Dispatcher.context_types`.

.. seealso:: `contexttypesbot.py <https://git.io/J0F8d>`_
.. seealso:: `contexttypesbot.py <https://github.com/python-telegram-bot/python-telegram-bot/tree/master\
/examples#contexttypesbotpy>`_

Args:
context_types (:class:`telegram.ext.ContextTypes`, optional): The context types.
Expand Down Expand Up @@ -984,7 +993,8 @@ def private_key(
to be used for :attr:`telegram.ext.Updater.bot`.

.. seealso:: `passportbot.py <https://github.com/python-telegram-bot/python-telegram-bot\
/tree/master/examples#passportbotpy>`_, `Telegram Passports <https://git.io/fAvYd>`_
/tree/master/examples#passportbotpy>`_, `Telegram Passports <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Telegram-Passport>`_

Args:
private_key (:obj:`bytes` | :obj:`str` | :obj:`pathlib.Path`): The private key or the
Expand All @@ -1003,7 +1013,8 @@ def defaults(self: BuilderType, defaults: 'Defaults') -> BuilderType:
"""Sets the :class:`telegram.ext.Defaults` object to be used for
:attr:`telegram.ext.Updater.bot`.

.. seealso:: `Adding Defaults <https://git.io/J0FGR>`_
.. seealso:: `Adding Defaults <https://github.com/python-telegram-bot/python-telegram-bot\
/wiki/Adding-defaults-to-your-bot>`_

Args:
defaults (:class:`telegram.ext.Defaults`): The defaults.
Expand All @@ -1021,8 +1032,10 @@ def arbitrary_callback_data(
cached in memory. If not called, only strings can be used as callback data and no data will
be stored in memory.

.. seealso:: `Arbitrary callback_data <https://git.io/JGBDI>`_,
`arbitrarycallbackdatabot.py <https://git.io/J0FBv>`_
.. seealso:: `Arbitrary callback_data <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Arbitrary-callback_data>`_,
`arbitrarycallbackdatabot.py <https://github.com/python-telegram-bot\
/python-telegram-bot/tree/master/examples#arbitrarycallbackdatabotpy>`_

Args:
arbitrary_callback_data (:obj:`bool` | :obj:`int`): If :obj:`True` is passed, the
Expand Down Expand Up @@ -1111,7 +1124,9 @@ def job_queue(
"""Sets a :class:`telegram.ext.JobQueue` instance to be used for the
:attr:`telegram.ext.Updater.dispatcher`. If not called, a job queue will be instantiated.

.. seealso:: `JobQueue <https://git.io/J0FCN>`_, `timerbot.py <https://git.io/J0FWf>`_,
.. seealso:: `JobQueue <https://github.com/python-telegram-bot/python-telegram-bot\
/wiki/Extensions-%E2%80%93-JobQueue>`_, `timerbot.py <https://github.com\
/python-telegram-bot/python-telegram-bot/tree/master/examples#timerbotpy>`_,
:attr:`telegram.ext.Dispatcher.job_queue`

Note:
Expand Down Expand Up @@ -1140,8 +1155,10 @@ def persistence(
"""Sets a :class:`telegram.ext.BasePersistence` instance to be used for the
:attr:`telegram.ext.Updater.dispatcher`.

.. seealso:: `Making your bot persistent <https://git.io/J0FWM>`_,
`persistentconversationbot.py <https://git.io/J0FW7>`_,
.. seealso:: `Making your bot persistent <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Making-your-bot-persistent>`_,
`persistentconversationbot.py <https://github.com/python-telegram-bot\
/python-telegram-bot/tree/master/examples#persistentconversationbotpy>`_,
:attr:`telegram.ext.Dispatcher.persistence`

Warning:
Expand All @@ -1164,7 +1181,8 @@ def context_types(
"""Sets a :class:`telegram.ext.ContextTypes` instance to be used for the
:attr:`telegram.ext.Updater.dispatcher`.

.. seealso:: `contexttypesbot.py <https://git.io/J0F8d>`_,
.. seealso:: `contexttypesbot.py <https://github.com/python-telegram-bot/python-telegram-bot/tree\
/master/examples#contexttypesbotpy>`_,
:attr:`telegram.ext.Dispatcher.context_types`.

Args:
Expand Down
11 changes: 8 additions & 3 deletions telegram/ext/_callbackcontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
from telegram.ext import Dispatcher, Job, JobQueue
from telegram.ext._utils.types import CCT

_STORING_DATA_WIKI = (
"https://github.com/python-telegram-bot/python-telegram-bot"
"/wiki/Storing-bot%2C-user-and-chat-related-data"
)


class CallbackContext(Generic[BT, UD, CD, BD]):
"""
Expand Down Expand Up @@ -155,7 +160,7 @@ def bot_data(self) -> BD:
@bot_data.setter
def bot_data(self, value: object) -> NoReturn:
raise AttributeError(
"You can not assign a new value to bot_data, see https://git.io/Jt6ic"
f"You can not assign a new value to bot_data, see {_STORING_DATA_WIKI}"
)

@property
Expand All @@ -176,7 +181,7 @@ def chat_data(self) -> Optional[CD]:
@chat_data.setter
def chat_data(self, value: object) -> NoReturn:
raise AttributeError(
"You can not assign a new value to chat_data, see https://git.io/Jt6ic"
f"You can not assign a new value to chat_data, see {_STORING_DATA_WIKI}"
)

@property
Expand All @@ -191,7 +196,7 @@ def user_data(self) -> Optional[UD]:
@user_data.setter
def user_data(self, value: object) -> NoReturn:
raise AttributeError(
"You can not assign a new value to user_data, see https://git.io/Jt6ic"
f"You can not assign a new value to user_data, see {_STORING_DATA_WIKI}"
)

def refresh_data(self) -> None:
Expand Down
3 changes: 2 additions & 1 deletion telegram/ext/_contexttypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class ContextTypes(Generic[CCT, UD, CD, BD]):

__slots__ = ('_context', '_bot_data', '_chat_data', '_user_data')

# overload signatures generated with https://git.io/JtJPj
# overload signatures generated with
# https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956

@overload
def __init__(
Expand Down
7 changes: 5 additions & 2 deletions telegram/ext/_conversationhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class ConversationHandler(Handler[Update, CCT]):

Finally, ``ConversationHandler``, does *not* handle (edited) channel posts.

.. _`FAQ`: https://git.io/JtcyU
.. _`FAQ`: https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do

The first collection, a ``list`` named :attr:`entry_points`, is used to initiate the
conversation, for example with a :class:`telegram.ext.CommandHandler` or
Expand Down Expand Up @@ -299,7 +300,9 @@ def __init__(

# this link will be added to all warnings tied to per_* setting
per_faq_link = (
" Read this FAQ entry to learn more about the per_* settings: https://git.io/JtcyU."
" Read this FAQ entry to learn more about the per_* settings: "
"https://github.com/python-telegram-bot/python-telegram-bot/wiki"
"/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do."
)

for handler in all_handlers:
Expand Down
3 changes: 2 additions & 1 deletion telegram/ext/_extbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class ExtBot(Bot):
arbitrary_callback_data (:obj:`bool` | :obj:`int`, optional): Whether to
allow arbitrary objects as callback data for :class:`telegram.InlineKeyboardButton`.
Pass an integer to specify the maximum number of objects cached in memory. For more
details, please see our `wiki <https://git.io/JGBDI>`_. Defaults to :obj:`False`.
details, please see our `wiki <https://github.com/python-telegram-bot\
/python-telegram-bot/wiki/Arbitrary-callback_data>`_. Defaults to :obj:`False`.

Attributes:
arbitrary_callback_data (:obj:`bool` | :obj:`int`): Whether this bot instance
Expand Down
4 changes: 3 additions & 1 deletion tests/test_conversationhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,9 @@ class NotUpdate:
)

per_faq_link = (
" Read this FAQ entry to learn more about the per_* settings: https://git.io/JtcyU."
" Read this FAQ entry to learn more about the per_* settings: "
"https://github.com/python-telegram-bot/python-telegram-bot/wiki"
"/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do."
)

assert str(recwarn[4].message) == (
Expand Down