Class AnswerInlineQueryMethod.
Use this method to send answers to an inline query. On success, True is returned. No more than 50 results per query are allowed.
see | |
---|---|
package | Default |
addResult(\TgBotApi\BotApiBase\Type\InlineQueryResult\InlineQueryResultType $result) : \TgBotApi\BotApiBase\Method\AnswerInlineQueryMethod
\TgBotApi\BotApiBase\Type\InlineQueryResult\InlineQueryResultType
\TgBotApi\BotApiBase\Method\AnswerInlineQueryMethod
create(string $inlineQueryId, array<mixed,\TgBotApi\BotApiBase\Type\InlineQueryResult\InlineQueryResultType> $results, array|null $data = null
) : \TgBotApi\BotApiBase\Method\AnswerInlineQueryMethod
string
array<mixed,\TgBotApi\BotApiBase\Type\InlineQueryResult\InlineQueryResultType>
array
null
\TgBotApi\BotApiBase\Exception\BadArgumentException |
---|
\TgBotApi\BotApiBase\Method\AnswerInlineQueryMethod
fill(array $data, array $forbidden = array()
)
array
array
\TgBotApi\BotApiBase\Exception\BadArgumentException |
---|
$cacheTime : \DateTimeInterface | null
Defaults to 300.
$inlineQueryId : string
$isPersonal : boolean | null
By default, results may be returned to any user who sends the same query.
$nextOffset : string | null
Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes.
$results : array<mixed,\TgBotApi\BotApiBase\Type\InlineQueryResult\InlineQueryResultType>
$switchPmParameter : string | null
Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a ‘Connect your YouTube account’ button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
$switchPmText : string | null