1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace TelegramBot\Entities\InlineQuery; |
4
|
|
|
|
5
|
|
|
use TelegramBot\Entities\InlineKeyboard; |
6
|
|
|
use TelegramBot\Entities\InputMessageContent\InputMessageContent; |
7
|
|
|
use TelegramBot\Entities\MessageEntity; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class InlineQueryResultVoice |
11
|
|
|
* |
12
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultvoice |
13
|
|
|
* |
14
|
|
|
* <code> |
15
|
|
|
* $data = [ |
16
|
|
|
* 'id' => '', |
17
|
|
|
* 'voice_url' => '', |
18
|
|
|
* 'title' => '', |
19
|
|
|
* 'caption' => '', |
20
|
|
|
* 'voice_duration' => 123, |
21
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
22
|
|
|
* 'input_message_content' => <InputMessageContent>, |
23
|
|
|
* ]; |
24
|
|
|
* </code> |
25
|
|
|
* |
26
|
|
|
* @method string getType() Type of the result, must be voice |
27
|
|
|
* @method string getId() Unique identifier for this result, 1-64 bytes |
28
|
|
|
* @method string getVoiceUrl() A valid URL for the voice recording |
29
|
|
|
* @method string getTitle() Recording title |
30
|
|
|
* @method string getCaption() Optional. Caption, 0-200 characters |
31
|
|
|
* @method string getParseMode() Optional. Mode for parsing entities in the voice caption |
32
|
|
|
* @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
33
|
|
|
* @method int getVoiceDuration() Optional. Recording duration in seconds |
34
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
35
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the voice recording |
36
|
|
|
* |
37
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 bytes |
38
|
|
|
* @method $this setVoiceUrl(string $voice_url) A valid URL for the voice recording |
39
|
|
|
* @method $this setTitle(string $title) Recording title |
40
|
|
|
* @method $this setCaption(string $caption) Optional. Caption, 0-200 characters |
41
|
|
|
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the voice caption |
42
|
|
|
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
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 implements InlineQueryResult |
48
|
|
|
{ |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* InlineQueryResultVoice constructor |
52
|
|
|
* |
53
|
|
|
* @param array $data |
54
|
|
|
*/ |
55
|
|
|
public function __construct(array $data = []) |
56
|
|
|
{ |
57
|
|
|
$data['type'] = 'voice'; |
58
|
|
|
parent::__construct($data); |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
} |
62
|
|
|
|