Link Search Menu Expand Document

Method: messages.sendInlineBotResult

Back to methods index

Send a result obtained using messages.getInlineBotResults.

Parameters:

NameTypeDescriptionRequired
silentBoolWhether to send the message silently (no notification will be triggered on the other client)Optional
backgroundBoolWhether to send the message in backgroundOptional
clear_draftBoolWhether to clear the draftOptional
hide_viaBoolWhether to hide the via @botname in the resulting message (only for bot usernames encountered in the config)Optional
peerUsername, chat ID, Update, Message or InputPeerDestinationOptional
reply_to_msg_idintID of the message this message should reply toOptional
top_msg_idintOptional
query_idlongQuery ID from messages.getInlineBotResultsYes
idstringResult ID from messages.getInlineBotResultsYes
schedule_dateintScheduled message date for scheduled messagesOptional
send_asUsername, chat ID, Update, Message or InputPeerSend this message as the specified peerOptional

Return type: Updates

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

// PHP 8+ syntax, use an array on PHP 7.
$Updates = $MadelineProto->messages->sendInlineBotResult(silent: Bool, background: Bool, clear_draft: Bool, hide_via: Bool, peer: InputPeer, reply_to_msg_id: int, top_msg_id: int, query_id: long, id: 'string', schedule_date: int, send_as: InputPeer, );