Repository Analysis

python-telegram-bot/python-telegram-bot

We have made you a wrapper you can't refuse

20.7 Moderate AI signal View on GitHub
20.7
Adjusted Score
20.7
Raw Score
100%
Time Factor
2026-05-29
Last Push
29,187
Stars
Python
Language
167,292
Lines of Code
805
Files
2885
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 298MEDIUM 50LOW 2537

Pattern Findings

2885 matches across 14 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers1375 hits · 1213 pts
SeverityFileLineSnippet
LOWtests/test_messageautodeletetimerchanged.py54 def test_time_period_properties(self, PTB_TIMEDELTA):
LOWtests/test_messageautodeletetimerchanged.py66 def test_time_period_int_deprecated(self, recwarn, PTB_TIMEDELTA):
LOWtests/test_botcommandscope.py55 def test_type_enum_conversion(self, bot_command_scope):
LOWtests/test_botcommandscope.py112def bot_command_scope_all_private_chats():
LOWtests/test_botcommandscope.py152def bot_command_scope_all_chat_administrators():
LOWtests/test_botcommandscope.py192def bot_command_scope_all_group_chats():
LOWtests/test_botcommandscope.py278def bot_command_scope_chat_administrators():
LOWtests/test_botcommandscope.py328def bot_command_scope_chat_member():
LOWtests/test_botcommandscope.py385def bot_command_scope_default():
LOWtests/test_version.py32 def test_bot_api_version_and_info(self):
LOWtests/test_menubutton.py51 def test_type_enum_conversion(self, menu_button):
LOWtests/conftest.py59def no_rerun_after_xfail_or_flood(error, name, test: pytest.Function, plugin):
LOWtests/conftest.py68def pytest_collection_modifyitems(items: list[pytest.Item]):
LOWtests/conftest.py95 def _disallow_requests_in_without_request_tests(request):
LOWtests/conftest.py292def _get_false_update_fixture_decorator_params():
LOWtests/test_suggestedpost.py44def suggested_post_parameters():
LOWtests/test_suggestedpost.py76 def test_de_json_localization(self, offline_bot, raw_bot, tz_bot):
LOWtests/test_suggestedpost.py144 def test_type_enum_conversion(self):
LOWtests/test_suggestedpost.py160 def test_de_json_localization(self, offline_bot, raw_bot, tz_bot):
LOWtests/test_suggestedpost.py488 def test_de_json_localization(self, offline_bot, raw_bot, tz_bot):
LOWtests/test_suggestedpost.py542def suggested_post_approval_failed():
LOWtests/test_messageorigin.py65def message_origin_hidden_user():
LOWtests/test_messageorigin.py139 def test_de_json_required_args(self, offline_bot, message_origin_type):
LOWtests/test_messageorigin.py166 def test_de_json_messageorigin_localization(
LOWtests/test_messageorigin.py182 def test_de_json_invalid_type(self, message_origin_type, offline_bot):
LOWtests/test_user.py184 async def test_instance_method_get_profile_photos(self, monkeypatch, user):
LOWtests/test_user.py199 async def test_instance_method_get_profile_audios(self, monkeypatch, user):
LOWtests/test_user.py214 async def test_instance_method_pin_message(self, monkeypatch, user):
LOWtests/test_user.py225 async def test_instance_method_unpin_message(self, monkeypatch, user):
LOWtests/test_user.py238 async def test_instance_method_unpin_all_messages(self, monkeypatch, user):
LOWtests/test_user.py253 async def test_instance_method_send_message(self, monkeypatch, user):
LOWtests/test_user.py264 async def test_instance_method_send_message_draft(self, monkeypatch, user):
LOWtests/test_user.py283 async def test_instance_method_send_photo(self, monkeypatch, user):
LOWtests/test_user.py294 async def test_instance_method_send_media_group(self, monkeypatch, user):
LOWtests/test_user.py307 async def test_instance_method_send_audio(self, monkeypatch, user):
LOWtests/test_user.py318 async def test_instance_method_send_chat_action(self, monkeypatch, user):
LOWtests/test_user.py331 async def test_instance_method_send_contact(self, monkeypatch, user):
LOWtests/test_user.py342 async def test_instance_method_send_dice(self, monkeypatch, user):
LOWtests/test_user.py353 async def test_instance_method_send_document(self, monkeypatch, user):
LOWtests/test_user.py364 async def test_instance_method_send_game(self, monkeypatch, user):
LOWtests/test_user.py375 async def test_instance_method_send_invoice(self, monkeypatch, user):
LOWtests/test_user.py400 async def test_instance_method_send_location(self, monkeypatch, user):
LOWtests/test_user.py411 async def test_instance_method_send_sticker(self, monkeypatch, user):
LOWtests/test_user.py422 async def test_instance_method_send_video(self, monkeypatch, user):
LOWtests/test_user.py433 async def test_instance_method_send_venue(self, monkeypatch, user):
LOWtests/test_user.py444 async def test_instance_method_send_video_note(self, monkeypatch, user):
LOWtests/test_user.py455 async def test_instance_method_send_voice(self, monkeypatch, user):
LOWtests/test_user.py466 async def test_instance_method_send_animation(self, monkeypatch, user):
LOWtests/test_user.py477 async def test_instance_method_send_poll(self, monkeypatch, user):
LOWtests/test_user.py488 async def test_instance_method_send_copy(self, monkeypatch, user):
LOWtests/test_user.py502 async def test_instance_method_copy_message(self, monkeypatch, user):
LOWtests/test_user.py516 async def test_instance_method_get_user_chat_boosts(self, monkeypatch, user):
LOWtests/test_user.py533 async def test_instance_method_get_menu_button(self, monkeypatch, user):
LOWtests/test_user.py551 async def test_instance_method_set_menu_button(self, monkeypatch, user):
LOWtests/test_user.py569 async def test_instance_method_approve_join_request(self, monkeypatch, user):
LOWtests/test_user.py586 async def test_instance_method_decline_join_request(self, monkeypatch, user):
LOWtests/test_user.py664 async def test_instance_method_send_copies(self, monkeypatch, user):
LOWtests/test_user.py678 async def test_instance_method_copy_messages(self, monkeypatch, user):
LOWtests/test_user.py694 async def test_instance_method_forward_from(self, monkeypatch, user):
LOWtests/test_user.py708 async def test_instance_method_forward_to(self, monkeypatch, user):
1315 more matches not shown…
Docstring Block Structure229 hits · 808 pts
SeverityFileLineSnippet
HIGHsrc/telegram/_ownedgift.py303Returns the text in :attr:`text` from a given :class:`telegram.MessageEntity` of :attr:`entities`. Note
HIGHsrc/telegram/_ownedgift.py328 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities fro
HIGHsrc/telegram/_poll.py619 This object contains information about a poll. Objects of this class are comparable in terms of equality. Two
HIGHsrc/telegram/_poll.py873Returns the text in :attr:`explanation` from a given :class:`telegram.MessageEntity` of :attr:`explanation_entit
HIGHsrc/telegram/_poll.py900 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities fro
HIGHsrc/telegram/_poll.py974Returns the text in :attr:`description` from a given :class:`telegram.MessageEntity` of :attr:`description_entit
HIGHsrc/telegram/_poll.py1003 Returns a :obj:`dict` that maps :class:`telegram.MessageEntity` to :obj:`str`. It contains entities fro
HIGHsrc/telegram/_chatmember.py37Base class for Telegram ChatMember Objects. Currently, the following 6 types of chat members are supported: * :
HIGHsrc/telegram/_telegramobject.py218 Objects of this type are subscriptable with strings, where ``telegram_object["attribute_name"]`` is equ
HIGHsrc/telegram/_bot.py892Do a request to the Telegram API. This method is here to make it easier to use new API methods that are not yet
HIGHsrc/telegram/_bot.py1031Use this method to send text messages. Args: chat_id (:obj:`int` | :obj:`str`): |chat_id_channel|
HIGHsrc/telegram/_bot.py1161 Use this method to delete a message, including service messages, with the following limitations:
HIGHsrc/telegram/_bot.py1223Use this method to stream a partial message to a user while the message is being generated. .. versiona
HIGHsrc/telegram/_bot.py1286 Use this method to delete multiple messages simultaneously. If some of the specified messages can't be
HIGHsrc/telegram/_bot.py1336 Use this method to forward messages of any kind. Service messages can't be forwarded. Note:
HIGHsrc/telegram/_bot.py1424 Use this method to forward messages of any kind. If some of the specified messages can't be found or fo
HIGHsrc/telegram/_bot.py1506Use this method to send photos. .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>
HIGHsrc/telegram/_bot.py1671 Use this method to send audio files, if you want Telegram clients to display them in the music player.
HIGHsrc/telegram/_bot.py1846 Use this method to send general files. Bots can currently send files of any type of up to :tg-
HIGHsrc/telegram/_bot.py2007 Use this method to send static ``.WEBP``, animated ``.TGS``, or video ``.WEBM`` stickers. .. seealso::
HIGHsrc/telegram/_bot.py2153Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document)
HIGHsrc/telegram/_bot.py2349 As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method
HIGHsrc/telegram/_bot.py2518 Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). Bots can current
HIGHsrc/telegram/_bot.py2699 Use this method to send audio files, if you want Telegram clients to display the file as a playable voi
HIGHsrc/telegram/_bot.py2864Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files ca
HIGHsrc/telegram/_bot.py3053Use this method to send point on the map. Note: You can either supply a :paramref:`latitude` and :p
HIGHsrc/telegram/_bot.py3388Use this method to send information about a venue. Note: * You can either supply :paramref:`venue`,
HIGHsrc/telegram/_bot.py3556Use this method to send phone contacts. Note: You can either supply :paramref:`contact` or :paramre
HIGHsrc/telegram/_bot.py3699Use this method to send a game. Args: chat_id (:obj:`int`): Unique identifier for the target chat.
HIGHsrc/telegram/_bot.py3791 Use this method when you need to tell the user that something is happening on the bot's side. The statu
HIGHsrc/telegram/_bot.py3941 Use this method to send answers to an inline query. No more than :tg-const:`telegram.InlineQuery.MAX_RE
HIGHsrc/telegram/_bot.py4039Stores a message that can be sent by a user of a Mini App. .. versionadded:: 21.8 Args: us
HIGHsrc/telegram/_bot.py4095Use this method to get a list of profile pictures for a user. Args: user_id (:obj:`int`): Unique id
HIGHsrc/telegram/_bot.py4148 Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can
HIGHsrc/telegram/_bot.py4214 Use this method to ban a user from a group, supergroup or a channel. In the case of supergroups and cha
HIGHsrc/telegram/_bot.py4273 Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the own
HIGHsrc/telegram/_bot.py4317Use this method to unban a previously kicked user in a supergroup or channel. The user will *not* return to the
HIGHsrc/telegram/_bot.py4360Use this method to unban a previously banned channel in a supergroup or channel. The bot must be an administrato
HIGHsrc/telegram/_bot.py4403 Use this method to send answers to callback queries sent from inline keyboards. The answer will be disp
HIGHsrc/telegram/_bot.py4477 Use this method to edit text and game messages. Note: * |editreplymarkup| * |b
HIGHsrc/telegram/_bot.py4583 Use this method to edit captions of messages. Note: * |editreplymarkup| * |bci
HIGHsrc/telegram/_bot.py4660 Use this method to edit animation, audio, document, photo, or video messages, or to add media to text m
HIGHsrc/telegram/_bot.py4729 Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bo
HIGHsrc/telegram/_bot.py4789Use this method to receive incoming updates using long polling. Note: 1. This method will not work
HIGHsrc/telegram/_bot.py4911 Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there i
HIGHsrc/telegram/_bot.py5023 Use this method to remove webhook integration if you decide to switch back to :meth:`get_updates()`.
HIGHsrc/telegram/_bot.py5060Use this method for your bot to leave a group, supergroup or channel. Args: chat_id (:obj:`int` | :
HIGHsrc/telegram/_bot.py5094 Use this method to get up to date information about the chat (current name of the user for one-on-one c
HIGHsrc/telegram/_bot.py5135 Use this method to get a list of administrators in a chat. .. versionchanged:: 20.0 Return
HIGHsrc/telegram/_bot.py5176Use this method to get the number of members in a chat. .. versionadded:: 13.7 Args: chat_
HIGHsrc/telegram/_bot.py5212Use this method to get information about a member of a chat. The method is only guaranteed to work for other use
HIGHsrc/telegram/_bot.py5349 Use this method to set the score of the specified user in a game message. .. seealso:: :attr:`telegram
HIGHsrc/telegram/_bot.py5410 Use this method to get data for high score tables. Will return the score of the specified user and seve
HIGHsrc/telegram/_bot.py5499Use this method to send invoices. Warning: As of API 5.2 :paramref:`start_parameter` is an optional
HIGHsrc/telegram/_bot.py5704 If you sent an invoice requesting a shipping address and the parameter :paramref:`send_invoice.is_flexi
HIGHsrc/telegram/_bot.py5761 Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmatio
HIGHsrc/telegram/_bot.py5816Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of
HIGHsrc/telegram/_bot.py5865 Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup
HIGHsrc/telegram/_bot.py5950 Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administra
HIGHsrc/telegram/_bot.py6073 Use this method to set default chat permissions for all members. The bot must be an administrator in th
169 more matches not shown…
Over-Commented Block469 hits · 461 pts
SeverityFileLineSnippet
LOWtests/test_messageautodeletetimerchanged.py1#!/usr/bin/env python
LOWtests/test_webappinfo.py1#!/usr/bin/env python
LOWtests/test_shared.py1#!/usr/bin/env python
LOWtests/test_botcommandscope.py1#!/usr/bin/env python
LOWtests/test_sentwebappmessage.py1#!/usr/bin/env python
LOWtests/test_version.py1#!/usr/bin/env python
LOWtests/test_menubutton.py1#!/usr/bin/env python
LOWtests/conftest.py1#!/usr/bin/env python
LOWtests/test_suggestedpost.py1#!/usr/bin/env python
LOWtests/test_messageorigin.py1#!/usr/bin/env python
LOWtests/test_warnings.py1#!/usr/bin/env python
LOWtests/test_user.py1#!/usr/bin/env python
LOWtests/test_webappdata.py1#!/usr/bin/env python
LOWtests/test_keyboardbuttonrequest.py1#!/usr/bin/env python
LOWtests/test_forum.py1#!/usr/bin/env python
LOWtests/test_preparedkeyboardbutton.py1#!/usr/bin/env python
LOWtests/test_videochat.py1#!/usr/bin/env python
LOWtests/test_keyboardbuttonpolltype.py1#!/usr/bin/env python
LOWtests/test_chatfullinfo.py1#!/usr/bin/env python
LOWtests/test_userrating.py1#!/usr/bin/env python
LOWtests/test_chatmemberupdated.py1#!/usr/bin/env python
LOWtests/test_message.py1#!/usr/bin/env python
LOWtests/test_chatlocation.py1#!/usr/bin/env python
LOWtests/test_checklists.py1#!/usr/bin/env python
LOWtests/test_reply.py1#!/usr/bin/env python
LOWtests/test_dice.py1#!/usr/bin/env python
LOWtests/test_business_methods.py1#!/usr/bin/env python
LOWtests/test_directmessagepricechanged.py1#!/usr/bin/env python
LOWtests/test_paidmedia.py1#!/usr/bin/env python
LOWtests/test_gifts.py1#!/usr/bin/env python
LOWtests/test_botdescription.py1#!/usr/bin/env python
LOWtests/test_inputchecklist.py1#!/usr/bin/env python
LOWtests/test_webhookinfo.py1#!/usr/bin/env python
LOWtests/test_chatpermissions.py1#!/usr/bin/env python
LOWtests/test_chatinvitelink.py1#!/usr/bin/env python
LOWtests/test_enum_types.py1#!/usr/bin/env python
LOWtests/test_messageentity.py1#!/usr/bin/env python
LOWtests/test_chatjoinrequest.py1#!/usr/bin/env python
LOWtests/test_update.py1#!/usr/bin/env python
LOWtests/test_copytextbutton.py1#!/usr/bin/env python
LOWtests/test_loginurl.py1#!/usr/bin/env python
LOWtests/test_chatmember.py1#!/usr/bin/env python
LOWtests/test_userprofilephotos.py1#!/usr/bin/env python
LOWtests/test_messageid.py1#!/usr/bin/env python
LOWtests/test_maybeinaccessiblemessage.py1#!/usr/bin/env python
LOWtests/test_managedbot.py1#!/usr/bin/env python
LOWtests/test_story.py1#!/usr/bin/env python
LOWtests/test_replykeyboardremove.py1#!/usr/bin/env python
LOWtests/test_chat.py1#!/usr/bin/env python
LOWtests/test_botcommand.py1#!/usr/bin/env python
LOWtests/test_error.py1#!/usr/bin/env python
LOWtests/test_business_classes.py1#!/usr/bin/env python
LOWtests/test_userprofileaudios.py1#!/usr/bin/env python
LOWtests/test_paidmessagepricechanged.py1#!/usr/bin/env python
LOWtests/test_proximityalerttriggered.py1#!/usr/bin/env python
LOWtests/test_telegramobject.py1#!/usr/bin/env python
LOWtests/test_reaction.py1#!/usr/bin/env python
LOWtests/test_slots.py1#!/usr/bin/env python
LOWtests/test_storyarea.py1#!/usr/bin/env python
LOWtests/test_writeaccessallowed.py1#!/usr/bin/env python
409 more matches not shown…
Unused Imports606 hits · 407 pts
SeverityFileLineSnippet
LOWtests/test_official/helpers.py33
LOWtests/request/test_request.py59
LOWtests/request/test_request.py59
LOWtests/request/test_request.py59
LOWtests/request/test_request.py59
LOWtests/request/test_request.py59
LOWdocs/auxil/sphinx_hooks.py41
LOWdocs/source/conf.py343
LOWsrc/telegram/_chatboost.py35
LOWsrc/telegram/_userprofileaudios.py29
LOWsrc/telegram/_ownedgift.py38
LOWsrc/telegram/_managedbot.py30
LOWsrc/telegram/_webhookinfo.py31
LOWsrc/telegram/_chatowner.py29
LOWsrc/telegram/_chatjoinrequest.py34
LOWsrc/telegram/_chatlocation.py30
LOWsrc/telegram/_poll.py49
LOWsrc/telegram/_chatfullinfo.py50
LOWsrc/telegram/_chatmember.py33
LOWsrc/telegram/_userprofilephotos.py29
LOWsrc/telegram/_keyboardbutton.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py35
LOWsrc/telegram/_callbackquery.py46
LOWsrc/telegram/_callbackquery.py47
LOWsrc/telegram/_chatbackground.py32
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py123
LOWsrc/telegram/_bot.py142
LOWsrc/telegram/__init__.py334
LOWsrc/telegram/__init__.py334
LOWsrc/telegram/__init__.py335
LOWsrc/telegram/__init__.py336
LOWsrc/telegram/__init__.py336
LOWsrc/telegram/__init__.py337
LOWsrc/telegram/__init__.py337
LOWsrc/telegram/__init__.py337
LOWsrc/telegram/__init__.py337
LOWsrc/telegram/__init__.py337
546 more matches not shown…
Cross-File Repetition68 hits · 340 pts
SeverityFileLineSnippet
HIGHtests/conftest.py0makes an regular bot instance with the given bot_info
HIGHtests/ext/conftest.py0makes an regular bot instance with the given bot_info
HIGHtests/ext/conftest.py0makes an regular bot instance with the given bot_info
HIGHtests/test_bot.py0we can't test every single method easily, so we just test one. our linting will catch any unused args with the others.
HIGHtests/test_bot.py0we can't test every single method easily, so we just test one. our linting will catch any unused args with the others.
HIGHtests/test_bot.py0we can't test every single method easily, so we just test one. our linting will catch any unused args with the others.
HIGHtests/test_bot.py0we can't test every single method easily, so we just test one. our linting will catch any unused args with the others.
HIGHexamples/conversationbot2.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at their
HIGHexamples/persistentconversationbot.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at their
HIGHexamples/conversationbot.py0first, a few callback functions are defined. then, those functions are passed to the application and registered at their
HIGHexamples/customwebhookbot/djangobot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.
HIGHexamples/customwebhookbot/quartbot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.
HIGHexamples/customwebhookbot/flaskbot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.
HIGHexamples/customwebhookbot/starlettebot.py0custom callbackcontext class that makes `user_data` available for updates of type `webhookupdate`.
HIGHexamples/customwebhookbot/djangobot.py0display a message with instructions on how to use this bot.
HIGHexamples/customwebhookbot/quartbot.py0display a message with instructions on how to use this bot.
HIGHexamples/customwebhookbot/flaskbot.py0display a message with instructions on how to use this bot.
HIGHexamples/customwebhookbot/starlettebot.py0display a message with instructions on how to use this bot.
HIGHexamples/customwebhookbot/djangobot.py0handle incoming telegram updates by putting them into the `update_queue`
HIGHexamples/customwebhookbot/quartbot.py0handle incoming telegram updates by putting them into the `update_queue`
HIGHexamples/customwebhookbot/flaskbot.py0handle incoming telegram updates by putting them into the `update_queue`
HIGHexamples/customwebhookbot/starlettebot.py0handle incoming telegram updates by putting them into the `update_queue`
HIGHexamples/customwebhookbot/djangobot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corr
HIGHexamples/customwebhookbot/quartbot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corr
HIGHexamples/customwebhookbot/flaskbot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corr
HIGHexamples/customwebhookbot/starlettebot.py0handle incoming webhook updates by also putting them into the `update_queue` if the required parameters were passed corr
HIGHexamples/customwebhookbot/djangobot.py0for the health endpoint, reply with a simple plain text message.
HIGHexamples/customwebhookbot/quartbot.py0for the health endpoint, reply with a simple plain text message.
HIGHexamples/customwebhookbot/flaskbot.py0for the health endpoint, reply with a simple plain text message.
HIGHexamples/customwebhookbot/starlettebot.py0for the health endpoint, reply with a simple plain text message.
HIGHexamples/customwebhookbot/quartbot.py0set up ptb application and a web application for handling the incoming requests.
HIGHexamples/customwebhookbot/flaskbot.py0set up ptb application and a web application for handling the incoming requests.
HIGHexamples/customwebhookbot/starlettebot.py0set up ptb application and a web application for handling the incoming requests.
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.gift_premium_subscription.month_count` parameter of :meth:`~tele
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.gift_premium_subscription.month_count` parameter of :meth:`~tele
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.gift_premium_subscription.month_count` parameter of :meth:`~tele
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.post_story.active_period`` parameter of :meth:`telegram.bot.post
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.post_story.active_period`` parameter of :meth:`telegram.bot.post
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.post_story.active_period`` parameter of :meth:`telegram.bot.post
HIGHsrc/telegram/constants.py0:obj:`int`: possible value for :paramref:`~telegram.bot.post_story.active_period`` parameter of :meth:`telegram.bot.post
HIGHsrc/telegram/constants.py0:obj:`str`: possible value for :paramref:`telegram.transactionpartneruser.transaction_type`.
HIGHsrc/telegram/constants.py0:obj:`str`: possible value for :paramref:`telegram.transactionpartneruser.transaction_type`.
HIGHsrc/telegram/constants.py0:obj:`str`: possible value for :paramref:`telegram.transactionpartneruser.transaction_type`.
HIGHsrc/telegram/constants.py0:obj:`str`: possible value for :paramref:`telegram.transactionpartneruser.transaction_type`.
HIGHsrc/telegram/constants.py0:obj:`str`: possible value for :paramref:`telegram.transactionpartneruser.transaction_type`.
HIGHsrc/telegram/_inline/inputlocationmessagecontent.py0:const:`telegram.constants.locationlimit.horizontal_accuracy` .. versionadded:: 20.0
HIGHsrc/telegram/_inline/inlinequeryresultlocation.py0:const:`telegram.constants.locationlimit.horizontal_accuracy` .. versionadded:: 20.0
HIGHsrc/telegram/_files/location.py0:const:`telegram.constants.locationlimit.horizontal_accuracy` .. versionadded:: 20.0
HIGHsrc/telegram/_inline/inputlocationmessagecontent.py0:const:`telegram.constants.locationlimit.min_heading` .. versionadded:: 20.0
HIGHsrc/telegram/_inline/inlinequeryresultlocation.py0:const:`telegram.constants.locationlimit.min_heading` .. versionadded:: 20.0
HIGHsrc/telegram/_files/location.py0:const:`telegram.constants.locationlimit.min_heading` .. versionadded:: 20.0
HIGHsrc/telegram/_inline/inputlocationmessagecontent.py0:const:`telegram.constants.locationlimit.max_heading` .. versionadded:: 20.0
HIGHsrc/telegram/_inline/inlinequeryresultlocation.py0:const:`telegram.constants.locationlimit.max_heading` .. versionadded:: 20.0
HIGHsrc/telegram/_files/location.py0:const:`telegram.constants.locationlimit.max_heading` .. versionadded:: 20.0
HIGHsrc/telegram/ext/_handlers/shippingqueryhandler.py0determines whether an update should be passed to this handler's :attr:`callback`. args: update (:class:`telegram.update`
HIGHsrc/telegram/ext/_handlers/businessconnectionhandler.py0determines whether an update should be passed to this handler's :attr:`callback`. args: update (:class:`telegram.update`
HIGHsrc/telegram/ext/_handlers/chatjoinrequesthandler.py0determines whether an update should be passed to this handler's :attr:`callback`. args: update (:class:`telegram.update`
HIGH…legram/ext/_handlers/businessmessagesdeletedhandler.py0determines whether an update should be passed to this handler's :attr:`callback`. args: update (:class:`telegram.update`
HIGHsrc/telegram/ext/_handlers/paidmediapurchasedhandler.py0determines whether an update should be passed to this handler's :attr:`callback`. args: update (:class:`telegram.update`
HIGHsrc/telegram/ext/_handlers/pollhandler.py0determines whether an update should be passed to this handler's :attr:`callback`. args: update (:class:`telegram.update`
8 more matches not shown…
Self-Referential Comments37 hits · 92 pts
SeverityFileLineSnippet
MEDIUMtests/request/test_request.py475 # Create a new one instead of using the fixture so that the mocking can work
MEDIUMdocs/auxil/admonition_inserter.py38# Define the namespace for type resolution. This helps dealing with the internal imports that
MEDIUMexamples/arbitrarycallbackdatabot.py98 # Create the Application and pass it your bot's token.
MEDIUMexamples/conversationbot2.py118 # Create the Application and pass it your bot's token.
MEDIUMexamples/inlinekeyboard.py58 # Create the Application and pass it your bot's token.
MEDIUMexamples/webappbot.py59 # Create the Application and pass it your bot's token.
MEDIUMexamples/echobot.py33# Define a few command handlers. These usually take the two arguments update and
MEDIUMexamples/echobot.py56 # Create the Application and pass it your bot's token.
MEDIUMexamples/persistentconversationbot.py135 # Create the Application and pass it your bot's token.
MEDIUMexamples/inlinekeyboard2.py168 # Create the Application and pass it your bot's token.
MEDIUMexamples/paymentbot.py141 # Create the Application and pass it your bot's token.
MEDIUMexamples/chatmemberbot.py158 # Create the Application and pass it your bot's token.
MEDIUMexamples/inlinebot.py36# Define a few command handlers. These usually take the two arguments update and
MEDIUMexamples/inlinebot.py82 # Create the Application and pass it your bot's token.
MEDIUMexamples/passportbot.py113 # Create the Application and pass it your token and private key
MEDIUMexamples/timerbot.py36# Define a few command handlers. These usually take the two arguments update and
MEDIUMexamples/timerbot.py95 # Create the Application and pass it your bot's token.
MEDIUMexamples/errorhandlerbot.py73 # Create the Application and pass it your bot's token.
MEDIUMexamples/pollbot.py161 # Create the Application and pass it your bot's token.
MEDIUMexamples/nestedconversationbot.py309 # Create the Application and pass it your bot's token.
MEDIUMexamples/deeplinking.py111 # Create the Application and pass it your bot's token.
MEDIUMexamples/conversationbot.py141 # Create the Application and pass it your bot's token.
MEDIUM.github/workflows/release_pypi.yml125 # Create a tag and a GitHub Release. The description is filled by the static template, we
MEDIUM.github/workflows/chango.yml38 # Create the new fragment
MEDIUM.github/workflows/copilot-setup-steps.yml1# This file is for the copilot agent on Github. This helps to set up the development environment
MEDIUM.github/workflows/release_test_pypi.yml127 # Create a tag and a GitHub Release *draft*. The description is filled by the static
MEDIUMsrc/telegram/_telegramobject.py545 """This method is used for obtaining the attributes of the object.
MEDIUMsrc/telegram/_bot.py851 # Initialize request objects if not already done
MEDIUMsrc/telegram/_bot.py639 """This method is here to make ext.Defaults work. Because we need to be able to tell
MEDIUMsrc/telegram/_reaction.py184 """This class represents a reaction added to a message along with the number of times it was
MEDIUMsrc/telegram/_messagereactionupdated.py38 """This class represents reaction changes on a message with anonymous reactions.
MEDIUMsrc/telegram/_messagereactionupdated.py105 """This class represents a change of a reaction on a message performed by a user.
MEDIUMsrc/telegram/ext/_jobqueue.py238 """This method is used as a callback for the APScheduler jobs.
MEDIUMsrc/telegram/ext/_jobqueue.py754 """This class is a convenience wrapper for the jobs held in a :class:`telegram.ext.JobQueue`.
MEDIUMsrc/telegram/ext/_extbot.py700 """This method is called by Bot.answer_inline_query to build the actual results list.
MEDIUMsrc/telegram/ext/_extbot.py730 """This method is called by Bot.answer_inline_query to replace `DefaultValue(obj)` with
MEDIUMsrc/telegram/ext/_utils/webhookhandler.py48# This module is not visible to users, so we log as Updater
Decorative Section Separators10 hits · 45 pts
SeverityFileLineSnippet
MEDIUMtests/test_paidmedia.py320# ===========================================================================================
MEDIUMtests/test_paidmedia.py321# ===========================================================================================
MEDIUMtests/test_paidmedia.py322# ===========================================================================================
MEDIUMtests/test_paidmedia.py323# ===========================================================================================
MEDIUMtests/test_paidmedia.py324# ===========================================================================================
MEDIUMtests/test_paidmedia.py325# ===========================================================================================
MEDIUMtests/test_paidmedia.py326# ===========================================================================================
MEDIUMtests/test_paidmedia.py327# ===========================================================================================
MEDIUMtests/test_paidmedia.py328# ===========================================================================================
MEDIUMtests/test_paidmedia.py329# ===========================================================================================
Excessive Try-Catch Wrapping33 hits · 34 pts
SeverityFileLineSnippet
LOWtests/auxil/bot_method_checks.py265 except Exception as exc:
LOWtests/auxil/bot_method_checks.py686 except Exception as exc:
LOWtests/ext/test_conversationhandler.py721 except Exception as exc:
LOWtests/ext/test_application.py2830 except Exception as e:
LOWdocs/auxil/link_code.py45 except Exception as exc:
LOWdocs/auxil/tg_const_role.py91 except Exception as exc:
LOWsrc/telegram/_bot.py412 except Exception:
LOWsrc/telegram/_bot.py4886 except Exception as exc:
LOWsrc/telegram/_utils/files.py94 except Exception:
LOWsrc/telegram/ext/_jobqueue.py1001 except Exception as exc:
LOWsrc/telegram/ext/_jobqueue.py1011 except Exception as exc:
LOWsrc/telegram/ext/_updater.py141 except Exception:
LOWsrc/telegram/ext/_updater.py309 except Exception:
LOWsrc/telegram/ext/_updater.py348 except Exception as exc:
LOWsrc/telegram/ext/_updater.py585 except Exception:
MEDIUMsrc/telegram/ext/_updater.py338def polling_action_cb() -> None:
LOWsrc/telegram/ext/_application.py371 except Exception:
LOWsrc/telegram/ext/_application.py635 except Exception:
LOWsrc/telegram/ext/_application.py1183 except Exception as exception:
LOWsrc/telegram/ext/_application.py1287 except Exception as exc:
LOWsrc/telegram/ext/_application.py1324 except Exception as exc:
LOWsrc/telegram/ext/_application.py1903 except Exception as exc:
LOWsrc/telegram/ext/_application.py1931 except Exception as exc:
LOWsrc/telegram/ext/_picklepersistence.py265 except Exception as exc:
LOWsrc/telegram/ext/_picklepersistence.py277 except Exception as exc:
MEDIUMsrc/telegram/ext/_picklepersistence.py245def _load_singlefile(self) -> None:
LOWsrc/telegram/ext/_baseupdateprocessor.py90 except Exception:
LOWsrc/telegram/ext/_utils/webhookhandler.py168 except Exception as exc:
LOWsrc/telegram/ext/_utils/stack.py60 except Exception as exc:
LOWsrc/telegram/ext/_handlers/conversationhandler.py667 except Exception as exc:
LOWsrc/telegram/ext/_handlers/conversationhandler.py702 except Exception as exc:
LOWsrc/telegram/request/_baserequest.py118 except Exception:
LOWsrc/telegram/request/_baserequest.py316 except Exception as exc:
Deep Nesting37 hits · 32 pts
SeverityFileLineSnippet
LOWtests/test_bot.py553
LOWtests/test_official/scraper.py85
LOWtests/test_official/arg_type_checker.py96
LOWtests/auxil/bot_method_checks.py59
LOWtests/auxil/bot_method_checks.py273
LOWtests/auxil/bot_method_checks.py431
LOWtests/_files/test_sticker.py768
LOWdocs/auxil/admonition_inserter.py272
LOWdocs/auxil/admonition_inserter.py483
LOWdocs/auxil/admonition_inserter.py511
LOWdocs/auxil/sphinx_hooks.py63
LOWdocs/auxil/sphinx_hooks.py83
LOWexamples/chatmemberbot.py65
LOWsrc/telegram/_telegramobject.py270
LOWsrc/telegram/_telegramobject.py594
LOWsrc/telegram/_bot.py638
LOWsrc/telegram/_message.py2041
LOWsrc/telegram/_message.py5324
LOWsrc/telegram/_message.py5524
LOWsrc/telegram/helpers.py45
LOWsrc/telegram/_update.py497
LOWsrc/telegram/_update.py652
LOWsrc/telegram/_update.py725
LOWsrc/telegram/_passport/encryptedpassportelement.py212
LOWsrc/telegram/ext/_callbackdatacache.py328
LOWsrc/telegram/ext/_extbot.py440
LOWsrc/telegram/ext/_extbot.py729
LOWsrc/telegram/ext/_application.py1021
LOWsrc/telegram/ext/_application.py1248
LOWsrc/telegram/ext/_application.py1685
LOWsrc/telegram/ext/_application.py1854
LOWsrc/telegram/ext/filters.py454
LOWsrc/telegram/ext/_handlers/conversationhandler.py286
LOWsrc/telegram/ext/_handlers/conversationhandler.py706
LOWsrc/telegram/ext/_handlers/conversationhandler.py797
LOWsrc/telegram/ext/_handlers/conversationhandler.py897
LOWsrc/telegram/request/_baserequest.py259
Redundant / Tautological Comments13 hits · 21 pts
SeverityFileLineSnippet
LOWtests/conftest.py74 if ( # Check if the class name ends with 'WithRequest' and if it has no flaky marker
LOWtests/test_bot.py4148 # Check if we pinned 3 messages
LOWtests/test_bot.py4146 assert len(messages) == 3 # Check if we sent 3 messages
LOWtests/test_bot.py4150 assert all(i.done() for i in pinned_messages_tasks) # Check if all tasks are done
LOWtests/test_bot.py4451 # Check if its been deleted-
LOWtests/test_official/test_official.py74 # Check if parameter is present in our method
LOWtests/test_official/test_official.py85 # Check if type annotation is present
LOWtests/test_official/test_official.py89 # Check if type annotation is correct
LOWtests/test_official/test_official.py165 # Check if type annotation is present
LOWtests/test_official/test_official.py170 # Check if type annotation is correct
LOWexamples/paymentbot.py106 # Verify if the payload matches, ensure it's from your bot
LOWexamples/paymentbot.py125 # Verify if the payload matches, ensure it's from your bot
LOWsrc/telegram/ext/_applicationbuilder.py1070 # Check if concurrent updates is bool and convert to integer
Slop Phrases4 hits · 5 pts
SeverityFileLineSnippet
LOWpyproject.toml60# When adding new extras, make sure to update `ext` and `all` accordingly
LOWexamples/inlinebot.py6Don't forget to enable inline mode with @BotFather
LOWsrc/telegram/_passport/credentials.py180 # We make sure to base64 decode the secret first.
LOWsrc/telegram/ext/_defaults.py147 # TODO: When dropping support, make sure to update _utils.datetime accordingly
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippet
HIGHtests/request/test_requestparameter.py67 ({True: None}, '{"true": null}'),
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippet
LOWexamples/chatmemberbot.py174 # To reset this, simply pass `allowed_updates=[]`
MEDIUMsrc/telegram/ext/__init__.py19"""Extensions over the Telegram Bot API to facilitate bot making"""
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/telegram/ext/filters.py456 # We need to check if the filters are data filters and if so return the merged data.