-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInlineQueryResultDocument.php
More file actions
100 lines (85 loc) · 4.5 KB
/
Copy pathInlineQueryResultDocument.php
File metadata and controls
100 lines (85 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
/**
* This file is auto-generated.
*/
namespace Telepath\Telegram;
/**
* Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
*/
class InlineQueryResultDocument extends InlineQueryResult
{
/** Type of the result, must be <em>document</em> */
public string $type = 'document';
/** Title for the result */
public string $title;
/** A valid URL for the file */
public string $document_url;
/** MIME type of the content of the file, either “application/pdf” or “application/zip” */
public string $mime_type;
/** <em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing */
public ?string $caption = null;
/** <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ?string $parse_mode = null;
/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
*
* @var MessageEntity[]
*/
public ?array $caption_entities = null;
/** <em>Optional</em>. Short description of the result */
public ?string $description = null;
/** <em>Optional</em>. Content of the message to be sent instead of the file */
public ?InputMessageContent $input_message_content = null;
/** <em>Optional</em>. URL of the thumbnail (JPEG only) for the file */
public ?string $thumbnail_url = null;
/** <em>Optional</em>. Thumbnail width */
public ?int $thumbnail_width = null;
/** <em>Optional</em>. Thumbnail height */
public ?int $thumbnail_height = null;
/**
* @param string $id Unique identifier for this result, 1-64 bytes
* @param string $title Title for the result
* @param string $document_url A valid URL for the file
* @param string $mime_type MIME type of the content of the file, either “application/pdf” or “application/zip”
* @param string $caption <em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param string $description <em>Optional</em>. Short description of the result
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the file
* @param string $thumbnail_url <em>Optional</em>. URL of the thumbnail (JPEG only) for the file
* @param int $thumbnail_width <em>Optional</em>. Thumbnail width
* @param int $thumbnail_height <em>Optional</em>. Thumbnail height
*/
public static function make(
string $id,
string $title,
string $document_url,
string $mime_type,
?string $caption = null,
?string $parse_mode = null,
?array $caption_entities = null,
?string $description = null,
?InlineKeyboardMarkup $reply_markup = null,
?InputMessageContent $input_message_content = null,
?string $thumbnail_url = null,
?int $thumbnail_width = null,
?int $thumbnail_height = null,
): static {
return new static([
'id' => $id,
'title' => $title,
'document_url' => $document_url,
'mime_type' => $mime_type,
'caption' => $caption,
'parse_mode' => $parse_mode,
'caption_entities' => $caption_entities,
'description' => $description,
'reply_markup' => $reply_markup,
'input_message_content' => $input_message_content,
'thumbnail_url' => $thumbnail_url,
'thumbnail_width' => $thumbnail_width,
'thumbnail_height' => $thumbnail_height,
]);
}
}