Summary
Bot API 10.0 (April 28, 2025) introduced Guest Bots — bots can now receive messages from chats they're not members of. This is directly relevant to Luna/pyclaudir: it would allow deployment into new groups without requiring full membership, reducing friction for new users.
What are Guest Bots?
A user can invoke a bot from any chat (even one the bot hasn't joined) via a guest query. The bot receives the message, processes it, and replies — without ever being added as a member.
New API surface to support
| Element |
Type |
Description |
guest_query_id |
string |
Unique ID of the guest query; used to respond via answerGuestQuery() |
guest_bot_caller_user |
User |
The user who initiated the guest interaction |
guest_bot_caller_chat |
Chat |
The chat from which the guest query came |
supports_guest_queries |
bool |
Field on User — whether a bot supports guest queries |
answerGuestQuery() |
Method |
Send a reply back into the originating chat |
SentGuestMessage |
Class |
Represents the message sent back via answerGuestQuery() |
What pyclaudir needs
- Dispatcher changes — detect incoming updates with
guest_query_id present and route them as a new message type (e.g. GuestMessage)
- Context injection — populate
guest_bot_caller_user and guest_bot_caller_chat into the <msg> envelope Luna receives, so she knows who asked and from where
- Reply routing — when Luna calls
send_message / reply_to_message in response to a guest query, the harness should use answerGuestQuery() instead of the normal send path
supports_guest_queries flag — set this to true in bot settings once the above is implemented
UX benefit
Luna could be invoked in groups without needing to be added as a member first. Lower barrier to entry for new communities trying Luna out.
References
Summary
Bot API 10.0 (April 28, 2025) introduced Guest Bots — bots can now receive messages from chats they're not members of. This is directly relevant to Luna/pyclaudir: it would allow deployment into new groups without requiring full membership, reducing friction for new users.
What are Guest Bots?
A user can invoke a bot from any chat (even one the bot hasn't joined) via a guest query. The bot receives the message, processes it, and replies — without ever being added as a member.
New API surface to support
guest_query_idstringanswerGuestQuery()guest_bot_caller_userUserguest_bot_caller_chatChatsupports_guest_queriesboolUser— whether a bot supports guest queriesanswerGuestQuery()SentGuestMessageanswerGuestQuery()What pyclaudir needs
guest_query_idpresent and route them as a new message type (e.g.GuestMessage)guest_bot_caller_userandguest_bot_caller_chatinto the<msg>envelope Luna receives, so she knows who asked and from wheresend_message/reply_to_messagein response to a guest query, the harness should useanswerGuestQuery()instead of the normal send pathsupports_guest_queriesflag — set this totruein bot settings once the above is implementedUX benefit
Luna could be invoked in groups without needing to be added as a member first. Lower barrier to entry for new communities trying Luna out.
References