2017-01-25 23:16:22 +01:00
|
|
|
---
|
|
|
|
title: messages.sendInlineBotResult
|
|
|
|
description: messages.sendInlineBotResult parameters, return type and example
|
|
|
|
---
|
|
|
|
## Method: messages.sendInlineBotResult
|
|
|
|
[Back to methods index](index.md)
|
|
|
|
|
|
|
|
|
|
|
|
### Parameters:
|
|
|
|
|
|
|
|
| Name | Type | Required |
|
|
|
|
|----------|:-------------:|---------:|
|
|
|
|
|silent|[Bool](../types/Bool.md) | Optional|
|
|
|
|
|background|[Bool](../types/Bool.md) | Optional|
|
|
|
|
|clear\_draft|[Bool](../types/Bool.md) | Optional|
|
2017-03-11 19:54:51 +01:00
|
|
|
|peer|[InputPeer](../types/InputPeer.md) | Yes|
|
2017-01-25 23:16:22 +01:00
|
|
|
|reply\_to\_msg\_id|[int](../types/int.md) | Optional|
|
2017-03-11 19:54:51 +01:00
|
|
|
|query\_id|[long](../types/long.md) | Yes|
|
|
|
|
|id|[string](../types/string.md) | Yes|
|
2017-01-25 23:16:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
### Return type: [Updates](../types/Updates.md)
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
$MadelineProto = new \danog\MadelineProto\API();
|
2017-04-10 13:49:32 +02:00
|
|
|
if (isset($token)) { // Login as a bot
|
2017-06-19 18:56:47 +02:00
|
|
|
$MadelineProto->bot_login($token);
|
2017-01-25 23:16:22 +01:00
|
|
|
}
|
2017-04-10 13:49:32 +02:00
|
|
|
if (isset($number)) { // Login as a user
|
2017-01-25 23:16:22 +01:00
|
|
|
$sentCode = $MadelineProto->phone_login($number);
|
|
|
|
echo 'Enter the code you received: ';
|
|
|
|
$code = '';
|
|
|
|
for ($x = 0; $x < $sentCode['type']['length']; $x++) {
|
|
|
|
$code .= fgetc(STDIN);
|
|
|
|
}
|
|
|
|
$MadelineProto->complete_phone_login($code);
|
|
|
|
}
|
|
|
|
|
2017-07-23 16:33:46 +02:00
|
|
|
$Updates = $MadelineProto->messages->sendInlineBotResult(['silent' => Bool, 'background' => Bool, 'clear_draft' => Bool, 'peer' => InputPeer, 'reply_to_msg_id' => int, 'query_id' => long, 'id' => 'string', ]);
|
2017-02-13 04:33:06 +01:00
|
|
|
```
|
2017-03-11 19:54:51 +01:00
|
|
|
|
2017-07-23 16:11:02 +02:00
|
|
|
Or, if you're using [PWRTelegram](https://pwrtelegram.xyz):
|
|
|
|
|
|
|
|
### As a bot:
|
|
|
|
|
|
|
|
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
|
|
* method - messages.sendInlineBotResult
|
2017-07-23 16:33:46 +02:00
|
|
|
* params - {"silent": Bool, "background": Bool, "clear_draft": Bool, "peer": InputPeer, "reply_to_msg_id": int, "query_id": long, "id": "string", }
|
2017-07-23 16:11:02 +02:00
|
|
|
|
2017-07-23 16:34:36 +02:00
|
|
|
|
2017-07-23 16:11:02 +02:00
|
|
|
|
|
|
|
### As a user:
|
|
|
|
|
|
|
|
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.sendInlineBotResult`
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
2017-07-23 16:35:53 +02:00
|
|
|
```
|
2017-07-23 16:11:02 +02:00
|
|
|
silent - Json encoded Bool
|
|
|
|
background - Json encoded Bool
|
|
|
|
clear_draft - Json encoded Bool
|
|
|
|
peer - Json encoded InputPeer
|
|
|
|
reply_to_msg_id - Json encoded int
|
|
|
|
query_id - Json encoded long
|
|
|
|
id - Json encoded string
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2017-03-11 19:54:51 +01:00
|
|
|
Or, if you're into Lua:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
Updates = messages.sendInlineBotResult({silent=Bool, background=Bool, clear_draft=Bool, peer=InputPeer, reply_to_msg_id=int, query_id=long, id='string', })
|
2017-03-11 19:54:51 +01:00
|
|
|
```
|
|
|
|
|