Link Search Menu Expand Document

Method: messages.sendInlineBotResult

Back to methods index

Send a result obtained using messages.getInlineBotResults.


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_idintThis field must contain the topic ID only when replying to messages in forum topics different from the “General” topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the “General” topic.
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('', 'madeline.php');
include 'madeline.php';

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

$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, );