mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 14:46:29 +01:00
Replace git.io Links (#2872)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
This commit is contained in:
parent
9c9b133ed2
commit
778eadbe7c
15 changed files with 70 additions and 37 deletions
4
.github/ISSUE_TEMPLATE/question.yml
vendored
4
.github/ISSUE_TEMPLATE/question.yml
vendored
|
@ -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
|
||||
|
|
|
@ -895,7 +895,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`_)
|
||||
----------------------------------
|
||||
|
@ -1100,7 +1100,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
|
||||
==============
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
|
@ -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).
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ Simple Bot to print/download all incoming passport data
|
|||
|
||||
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
|
||||
|
|
2
setup.py
2
setup.py
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -626,7 +626,8 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
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
|
||||
|
@ -645,7 +646,8 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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.
|
||||
|
@ -663,8 +665,10 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
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
|
||||
|
@ -750,7 +754,9 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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
|
||||
|
@ -778,8 +784,10 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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`,
|
||||
|
@ -801,7 +809,8 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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.
|
||||
|
@ -984,7 +993,8 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
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
|
||||
|
@ -1003,7 +1013,8 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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.
|
||||
|
@ -1021,8 +1032,10 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
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
|
||||
|
@ -1111,7 +1124,9 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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:
|
||||
|
@ -1140,8 +1155,10 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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:
|
||||
|
@ -1164,7 +1181,8 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]):
|
|||
"""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:
|
||||
|
|
|
@ -40,6 +40,11 @@ if TYPE_CHECKING:
|
|||
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]):
|
||||
"""
|
||||
|
@ -155,7 +160,7 @@ class CallbackContext(Generic[BT, UD, CD, 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
|
||||
|
@ -176,7 +181,7 @@ class CallbackContext(Generic[BT, UD, CD, BD]):
|
|||
@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
|
||||
|
@ -191,7 +196,7 @@ class CallbackContext(Generic[BT, UD, CD, BD]):
|
|||
@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:
|
||||
|
|
|
@ -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__(
|
||||
|
|
|
@ -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
|
||||
|
@ -299,7 +300,9 @@ class ConversationHandler(Handler[Update, CCT]):
|
|||
|
||||
# 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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1449,7 +1449,9 @@ class TestConversationHandler:
|
|||
)
|
||||
|
||||
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) == (
|
||||
|
|
Loading…
Reference in a new issue