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.

Layer 223

Method schema is available as of layer 225. Switch »

Parameters #

NameTypeDescription
query_idlongQuery identifier from the updateBotGuestChatQuery.query_id field
resultInputBotInlineResultThe result to send as the answer to the query

Result #

InputBotInlineMessageID

Only bots can use this method #

Possible errors #

CodeTypeDescription
403USER_BOT_INVALIDUser 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.
400USER_BOT_REQUIREDThis method can only be called by a bot.

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.