Title: ConversationHandler do not support per_message_thread_id conversations · Issue #4768 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: ConversationHandler do not support per_message_thread_id conversations · Issue #4768 · python-telegram-bot/python-telegram-bot
X Title: ConversationHandler do not support per_message_thread_id conversations · Issue #4768 · python-telegram-bot/python-telegram-bot
Description: What kind of feature are you missing? Where do you notice a shortcoming of PTB? Hello, I'm developing a bot based on python-telegram-bot which leverages topics (threads) in group chats. In particular I would like to use ConversationHandl...
Open Graph Description: What kind of feature are you missing? Where do you notice a shortcoming of PTB? Hello, I'm developing a bot based on python-telegram-bot which leverages topics (threads) in group chats. In particul...
X Description: What kind of feature are you missing? Where do you notice a shortcoming of PTB? Hello, I'm developing a bot based on python-telegram-bot which leverages topics (threads) in group chats. In part...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/4768
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ConversationHandler do not support per_message_thread_id conversations","articleBody":"### What kind of feature are you missing? Where do you notice a shortcoming of PTB?\n\nHello,\n\nI'm developing a bot based on python-telegram-bot which leverages topics (threads) in group chats. In particular I would like to use ConversationHandler to interact with a bot independently per message thread. But it looks that ConversationHandler supports `per_user` and `per_chat` modes.\n\nCurrently it's possible to start conversation in one topic and continue in another.\n\n### Describe the solution you'd like\n\nAdditional property for ConversationHandler to support chat topics\n\n### Describe alternatives you've considered\n\nThere is also `per_message` mode available for ConversationHandler, but using it with the following code:\n\n```python\n app.add_handler(ConversationHandler(\n entry_points=[CommandHandler('edit', self.edit_command)],\n states={\n self.EDIT: [\n MessageHandler(filters.TEXT & ~filters.COMMAND, self.edit_command_done)],\n },\n fallbacks=[CommandHandler('cancel', self.cancel_command)],\n per_message=True,\n ))\n```\n\nmakes ConversationHandler not working and cresults in a warning:\n\n```\nPTBUserWarning: If 'per_message=True', all entry points, state handlers, and fallbacks must be 'CallbackQueryHandler', since no other handlers have a message context. 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.\n app.add_handler(ConversationHandler(\n```\n\n### Additional context\n\n_No response_","author":{"url":"https://github.com/RomanValov","@type":"Person","name":"RomanValov"},"datePublished":"2025-04-25T15:11:24Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/4768"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f3f986ba-6d5a-3e8d-483d-884d70c4b1b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E924:EAD6D:196BFB2:1FD1EAB:6B027DA0 |
| html-safe-nonce | 9fb7ed5e5014eaa8978f7179a51787484991245531cf9bf41ee711406c439b78 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTI0OkVBRDZEOjE5NkJGQjI6MUZEMUVBQjo2QjAyN0RBMCIsInZpc2l0b3JfaWQiOiI1ODU1OTAwMjI0MzkxOTA0NjcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a2b932af52e3758e4027a94d623f0fb8dec9cfffe7d1d55a1e6f572a1441aa17 |
| hovercard-subject-tag | issue:3020342498 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/4768/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35711627a9eb870af0cdbacce7b83d9c882b33dce033891ccfb0cb001a12c329/python-telegram-bot/python-telegram-bot/issues/4768 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35711627a9eb870af0cdbacce7b83d9c882b33dce033891ccfb0cb001a12c329/python-telegram-bot/python-telegram-bot/issues/4768 |
| og:image:alt | What kind of feature are you missing? Where do you notice a shortcoming of PTB? Hello, I'm developing a bot based on python-telegram-bot which leverages topics (threads) in group chats. In particul... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RomanValov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width