Skip to content

Bot API 10.0: Guest Mode#5239

Open
harshil21 wants to merge 2 commits into
api-10.0-centralfrom
api-10.0-guest
Open

Bot API 10.0: Guest Mode#5239
harshil21 wants to merge 2 commits into
api-10.0-centralfrom
api-10.0-guest

Conversation

@harshil21
Copy link
Copy Markdown
Member

  • Fix the changelog entry

@harshil21 harshil21 added the ⚙️ bot-api affected functionality: bot-api label May 20, 2026
Comment thread src/telegram/_bot.py
sent.

Returns:
:class:`telegram.SentGuestMessage`: On success, a sent
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:class:`telegram.SentGuestMessage`: On success, a sent
:class:`telegram.SentGuestMessage`: On success, a

Comment thread src/telegram/_message.py

.. versionadded:: NEXT.VERSION
guest_bot_caller_chat (:class:`telegram.Chat`, optional): For a message sent by a guest
bot, this is the user whose original message triggered the bot's response.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bot, this is the user whose original message triggered the bot's response.
bot, this is the chat whose original message triggered the bot's response.

Comment thread src/telegram/_message.py
Comment on lines +721 to +723
message. If non-empty, the message belongs to a chat of the corresponding business
account that is independent from any potential bot chat which might share the same
identifier.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message. If non-empty, the message belongs to a chat of the corresponding business
account that is independent from any potential bot chat which might share the same
identifier.
message. If non-empty, the message belongs to the chat where the guest
bot was summoned, which may not coincide with other existing bot chats
sharing the same identifier.

Comment thread src/telegram/_message.py

.. versionadded:: NEXT.VERSION
guest_bot_caller_chat (:class:`telegram.Chat`): Optional. For a message sent by a guest
bot, this is the user whose original message triggered the bot's response.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bot, this is the user whose original message triggered the bot's response.
bot, this is the chat whose original message triggered the bot's response.

Comment thread src/telegram/_message.py
Comment on lines +1168 to +1170
message. If non-empty, the message belongs to a chat of the corresponding business
account that is independent from any potential bot chat which might share the same
identifier.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message. If non-empty, the message belongs to a chat of the corresponding business
account that is independent from any potential bot chat which might share the same
identifier.
message. If non-empty, the message belongs to the chat where the guest
bot was summoned, which may not coincide with other existing bot chats
sharing the same identifier.

Comment thread src/telegram/_message.py
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a shortcut for answer_guest_query here would be ideal

Comment thread src/telegram/_update.py
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want effective_user/chat to get the user/chat from Message.guest_bot_caller_user/chat?

Is Message.from_user the same as Message.guest_bot_caller_user for a guest message?

Comment thread tests/test_update.py
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the shortcut test methods need to be updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ bot-api affected functionality: bot-api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants