Title: [FEATURE] Make tg.Bot comparable · Issue #2319 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [FEATURE] Make tg.Bot comparable · Issue #2319 · python-telegram-bot/python-telegram-bot
X Title: [FEATURE] Make tg.Bot comparable · Issue #2319 · python-telegram-bot/python-telegram-bot
Description: tg.Bot didn't get rich comparison in #1724, though there are use cases when comparison of Bot with User objects would be helpful. Most notable when checking if the bot is one of the new chat members reportet in a status update; with rich...
Open Graph Description: tg.Bot didn't get rich comparison in #1724, though there are use cases when comparison of Bot with User objects would be helpful. Most notable when checking if the bot is one of the new chat member...
X Description: tg.Bot didn't get rich comparison in #1724, though there are use cases when comparison of Bot with User objects would be helpful. Most notable when checking if the bot is one of the new chat me...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2319
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE] Make tg.Bot comparable","articleBody":"`tg.Bot` didn't get rich comparison in #1724, though there are use cases when comparison of `Bot` with `User` objects would be helpful. Most notable when checking if the bot is one of the new chat members reportet in a status update; with rich comparison that would be as easy as\r\n\r\n```python\r\ncontext.bot in update.effective_message.new_chat_members\r\n```\r\n\r\nCurrently one can use `bot_instance.bot`, which holds the `User` instance for comparison, but it's undocumented and unintuitive. Proposal:\r\n\r\n* Make `Bot.__eq__(self, other)` basically return `self.bot == other` and document the behaviour accordingly\r\n* we need to make sure that `self.bot` is already set. For the `Bot.{id, username, …}` properties, that's currently done with the `@info` decorator. I think it would be cleaner to just convert `self.bot` into a property that calls `self.get_me()` if needed.","author":{"url":"https://github.com/Bibo-Joshi","@type":"Person","name":"Bibo-Joshi"},"datePublished":"2021-01-15T14:03:11Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2319"}
| 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:5e88b4a5-427c-3f48-0934-7a96daa04d7b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82FE:2E3FEE:4E29BB3:62A1652:6B025F79 |
| html-safe-nonce | 96285b420fc165e7f1921cd61d452a1f1bc3bee267a459dd4f13675252ead09f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkZFOjJFM0ZFRTo0RTI5QkIzOjYyQTE2NTI6NkIwMjVGNzkiLCJ2aXNpdG9yX2lkIjoiMzk5NjM1MTA5MzcyMTQyMzczNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a6c0b403313898d6895fe72d71ef894199b97637f2928f0005d67830416bc394 |
| hovercard-subject-tag | issue:786919345 |
| 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/2319/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c09d407cc88700fe46951a9d2671b992f3d29195b0c881b6b80d149e66de184a/python-telegram-bot/python-telegram-bot/issues/2319 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c09d407cc88700fe46951a9d2671b992f3d29195b0c881b6b80d149e66de184a/python-telegram-bot/python-telegram-bot/issues/2319 |
| og:image:alt | tg.Bot didn't get rich comparison in #1724, though there are use cases when comparison of Bot with User objects would be helpful. Most notable when checking if the bot is one of the new chat member... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Bibo-Joshi |
| 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