Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace allgit.io links with their actual URLs#2973

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 3 commits intopython-telegram-bot:doc-fixes-v13fromSukkaW:replace-all-git-io-links
May 25, 2022
Merged
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsCHANGES.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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`_)
----------------------------------
Expand DownExpand Up@@ -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
==============
Expand Down
2 changes: 1 addition & 1 deletiondocs/source/_static/dark.css
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsexamples/README.md
View file
Open in desktop
Original file line numberDiff line numberDiff 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/v13.x/examples/inlinekeyboard.py)
This example sheds some light on inline keyboards, callback queries and message editing. A wikipedia site explaining this examples lives at https://git.io/JOmFw.
This example sheds some light on inline keyboards, callback queries and message editing. A wikipedia site explaining this examples lives at https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example.

### [`inlinekeyboard2.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/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/v13.x/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/v13.x/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/v13.x/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/v13.x/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 deletionexamples/arbitrarycallbackdatabot.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionexamples/inlinekeyboard.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionexamples/passportbot.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,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 deletionstelegram/dice.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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
12 changes: 9 additions & 3 deletionstelegram/ext/callbackcontext.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -139,7 +139,9 @@ 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"
"You can not assign a new value to bot_data, "
"see https://github.com/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C"
"-user-and-chat-related-data "
)

@property
Expand All@@ -160,7 +162,9 @@ 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"
"You can not assign a new value to chat_data, "
"see https://github.com/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C"
"-user-and-chat-related-data "
)

@property
Expand All@@ -175,7 +179,9 @@ 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"
"You can not assign a new value to user_data, "
"see https://github.com/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C"
"-user-and-chat-related-data "
)

def refresh_data(self) -> None:
Expand Down
3 changes: 2 additions & 1 deletiontelegram/ext/callbackqueryhandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,7 +55,8 @@ class CallbackQueryHandler(Handler[Update, CCT]):
user or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.
* If your bot allows arbitrary objects as ``callback_data``, it may happen that the
original ``callback_data`` for the incoming :class:`telegram.CallbackQuery`` can not be
found. This is the case when either a malicious client tempered with the
Expand Down
3 changes: 2 additions & 1 deletiontelegram/ext/chatjoinrequesthandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,7 +35,8 @@ class ChatJoinRequestHandler(Handler[Update, CCT]):
or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand Down
3 changes: 2 additions & 1 deletiontelegram/ext/chatmemberhandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,8 @@ class ChatMemberHandler(Handler[Update, CCT]):
or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand Down
3 changes: 2 additions & 1 deletiontelegram/ext/choseninlineresulthandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,8 @@ class ChosenInlineResultHandler(Handler[Update, CCT]):
or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand Down
10 changes: 7 additions & 3 deletionstelegram/ext/commandhandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,7 +55,8 @@ class CommandHandler(Handler[Update, CCT]):
user or in the same chat, it will be the same :obj:`dict`.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand DownExpand Up@@ -169,7 +170,9 @@ def __init__(

if allow_edited is not None:
warnings.warn(
'allow_edited is deprecated. See https://git.io/fxJuV for more info',
'allow_edited is deprecated. See '
'https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition'
'-guide-to-Version-12.0 for more info',
TelegramDeprecationWarning,
stacklevel=2,
)
Expand DownExpand Up@@ -288,7 +291,8 @@ class PrefixHandler(CommandHandler):
user or in the same chat, it will be the same :obj:`dict`.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand Down
3 changes: 2 additions & 1 deletiontelegram/ext/contexttypes.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,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
3 changes: 2 additions & 1 deletiontelegram/ext/conversationhandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,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
7 changes: 5 additions & 2 deletionstelegram/ext/dispatcher.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -241,7 +241,9 @@ def __init__(

if not use_context:
warnings.warn(
'Old Handler API is deprecated - see https://git.io/fxJuV for details',
'Old Handler API is deprecated - see '
'https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition'
'-guide-to-Version-12.0 for details',
TelegramDeprecationWarning,
stacklevel=3,
)
Expand DownExpand Up@@ -763,7 +765,8 @@ def add_error_handler(
asynchronously using :meth:`run_async`. Defaults to :obj:`False`.

Note:
See https://git.io/fxJuV for more info about switching to context based API.
See https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info about switching to context based API.
"""
if callback in self.error_handlers:
self.logger.debug('The callback is already registered as an error handler. Ignoring.')
Expand Down
4 changes: 3 additions & 1 deletiontelegram/ext/extbot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,7 +62,9 @@ class ExtBot(telegram.bot.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
6 changes: 4 additions & 2 deletionstelegram/ext/handler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,7 +45,8 @@ class Handler(Generic[UT, CCT], ABC):
or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand DownExpand Up@@ -232,7 +233,8 @@ def collect_optional_args(
it should subclass this method, but remember to call this super method.

DEPRECATED: This method is being replaced by new context based callbacks. Please see
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Args:
dispatcher (:class:`telegram.ext.Dispatcher`): The dispatcher.
Expand Down
3 changes: 2 additions & 1 deletiontelegram/ext/inlinequeryhandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,7 +55,8 @@ class InlineQueryHandler(Handler[Update, CCT]):
or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
* When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand Down
16 changes: 12 additions & 4 deletionstelegram/ext/messagehandler.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,7 +45,8 @@ class MessageHandler(Handler[Update, CCT]):
or in the same chat, it will be the same ``dict``.

Note that this is DEPRECATED, and you should use context based callbacks. See
https://git.io/fxJuV for more info.
https://github.com/python-telegram-bot/python-telegram-bot/wiki\
/Transition-guide-to-Version-12.0 for more info.

Warning:
When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom
Expand DownExpand Up@@ -155,7 +156,9 @@ def __init__(
self.filters = Filters.update
if message_updates is not None:
warnings.warn(
'message_updates is deprecated. See https://git.io/fxJuV for more info',
'message_updates is deprecated. See '
'https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition'
'-guide-to-Version-12.0 for more info',
TelegramDeprecationWarning,
stacklevel=2,
)
Expand All@@ -164,7 +167,10 @@ def __init__(

if channel_post_updates is not None:
warnings.warn(
'channel_post_updates is deprecated. See https://git.io/fxJuV ' 'for more info',
'channel_post_updates is deprecated. See '
'https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition'
'-guide-to-Version-12.0 '
'for more info',
TelegramDeprecationWarning,
stacklevel=2,
)
Expand All@@ -173,7 +179,9 @@ def __init__(

if edited_updates is not None:
warnings.warn(
'edited_updates is deprecated. See https://git.io/fxJuV for more info',
'edited_updates is deprecated. See '
'https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition'
'-guide-to-Version-12.0 for more info',
TelegramDeprecationWarning,
stacklevel=2,
)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp