1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of the TelegramBot package. |
4
|
|
|
* |
5
|
|
|
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]> |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Longman\TelegramBot\Entities\InlineQuery; |
12
|
|
|
|
13
|
|
|
use Longman\TelegramBot\Entities\InlineKeyboard; |
14
|
|
|
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class InlineQueryResultVoice |
18
|
|
|
* |
19
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultvoice |
20
|
|
|
* |
21
|
|
|
* <code> |
22
|
|
|
* $data = [ |
23
|
|
|
* 'id' => '', |
24
|
|
|
* 'voice_url' => '', |
25
|
|
|
* 'title' => '', |
26
|
|
|
* 'voice_duration' => 123, |
27
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
28
|
|
|
* 'input_message_content' => <InputMessageContent>, |
29
|
|
|
* ]; |
30
|
|
|
* </code> |
31
|
|
|
* |
32
|
|
|
* @method string getType() Type of the result, must be voice |
33
|
|
|
* @method string getId() Unique identifier for this result, 1-64 bytes |
34
|
|
|
* @method string getVoiceUrl() A valid URL for the voice recording |
35
|
|
|
* @method string getTitle() Recording title |
36
|
|
|
* @method int getVoiceDuration() Optional. Recording duration in seconds |
37
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
38
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the voice recording |
39
|
|
|
* |
40
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 bytes |
41
|
|
|
* @method $this setVoiceUrl(string $voice_url) A valid URL for the voice recording |
42
|
|
|
* @method $this setTitle(string $title) Recording title |
43
|
|
|
* @method $this setVoiceDuration(int $voice_duration) Optional. Recording duration in seconds |
44
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
45
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the voice recording |
46
|
|
|
*/ |
47
|
|
|
class InlineQueryResultVoice extends InlineEntity |
48
|
|
|
{ |
49
|
|
|
/** |
50
|
|
|
* InlineQueryResultVoice constructor |
51
|
|
|
* |
52
|
|
|
* @param array $data |
53
|
|
|
* |
54
|
|
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
55
|
|
|
*/ |
56
|
|
|
public function __construct(array $data = []) |
57
|
|
|
{ |
58
|
|
|
$data['type'] = 'voice'; |
59
|
|
|
parent::__construct($data); |
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
|