messages.setBotGuestChatResult

Bots may use this method to answer a guest mode » query received via an updateBotGuestChatQuery update, providing the message to post into the chat as a guest, see here » for more info.

 Method schema is available as of layer 225. Switch »

Parameters

Name Type Description
query_id long Query identifier from the updateBotGuestChatQuery.query_id field
result InputBotInlineResult The result to send as the answer to the query

Result

InputBotInlineMessageID

Only bots can use this method

Possible errors

Code Type Description
403 USER_BOT_INVALID User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
400 USER_BOT_REQUIRED This method can only be called by a bot.

Related pages

updateBotGuestChatQuery

Sent to guest bots » when a user invokes the bot as a guest in a chat. The bot should reply by invoking messages.setBotGuestChatResult, see here » for more info.

Guest mode for bots

Guest bots can be queried by username from any non-secret private chat, group and supergroup (except for groups/supergroups with content protection » enabled), posting their results directly into the chat, even if they're not a member.