-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatPermissions.php
More file actions
113 lines (94 loc) · 5.99 KB
/
Copy pathChatPermissions.php
File metadata and controls
113 lines (94 loc) · 5.99 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
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* This file is auto-generated.
*/
namespace Telepath\Telegram;
use Telepath\Types\Type;
/**
* Describes actions that a non-administrator user is allowed to take in a chat.
*/
class ChatPermissions extends Type
{
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues */
public ?bool $can_send_messages = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send audios */
public ?bool $can_send_audios = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send documents */
public ?bool $can_send_documents = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send photos */
public ?bool $can_send_photos = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send videos */
public ?bool $can_send_videos = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send video notes */
public ?bool $can_send_video_notes = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send voice notes */
public ?bool $can_send_voice_notes = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send polls and checklists */
public ?bool $can_send_polls = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots */
public ?bool $can_send_other_messages = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to add web page previews to their messages */
public ?bool $can_add_web_page_previews = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to edit their own tag */
public ?bool $can_edit_tag = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups */
public ?bool $can_change_info = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to invite new users to the chat */
public ?bool $can_invite_users = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to pin messages. Ignored in public supergroups */
public ?bool $can_pin_messages = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */
public ?bool $can_manage_topics = null;
/**
* @param bool $can_send_messages <em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues
* @param bool $can_send_audios <em>Optional</em>. <em>True</em>, if the user is allowed to send audios
* @param bool $can_send_documents <em>Optional</em>. <em>True</em>, if the user is allowed to send documents
* @param bool $can_send_photos <em>Optional</em>. <em>True</em>, if the user is allowed to send photos
* @param bool $can_send_videos <em>Optional</em>. <em>True</em>, if the user is allowed to send videos
* @param bool $can_send_video_notes <em>Optional</em>. <em>True</em>, if the user is allowed to send video notes
* @param bool $can_send_voice_notes <em>Optional</em>. <em>True</em>, if the user is allowed to send voice notes
* @param bool $can_send_polls <em>Optional</em>. <em>True</em>, if the user is allowed to send polls and checklists
* @param bool $can_send_other_messages <em>Optional</em>. <em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots
* @param bool $can_add_web_page_previews <em>Optional</em>. <em>True</em>, if the user is allowed to add web page previews to their messages
* @param bool $can_edit_tag <em>Optional</em>. <em>True</em>, if the user is allowed to edit their own tag
* @param bool $can_change_info <em>Optional</em>. <em>True</em>, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
* @param bool $can_invite_users <em>Optional</em>. <em>True</em>, if the user is allowed to invite new users to the chat
* @param bool $can_pin_messages <em>Optional</em>. <em>True</em>, if the user is allowed to pin messages. Ignored in public supergroups
* @param bool $can_manage_topics <em>Optional</em>. <em>True</em>, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
*/
public static function make(
?bool $can_send_messages = null,
?bool $can_send_audios = null,
?bool $can_send_documents = null,
?bool $can_send_photos = null,
?bool $can_send_videos = null,
?bool $can_send_video_notes = null,
?bool $can_send_voice_notes = null,
?bool $can_send_polls = null,
?bool $can_send_other_messages = null,
?bool $can_add_web_page_previews = null,
?bool $can_edit_tag = null,
?bool $can_change_info = null,
?bool $can_invite_users = null,
?bool $can_pin_messages = null,
?bool $can_manage_topics = null,
): static {
return new static([
'can_send_messages' => $can_send_messages,
'can_send_audios' => $can_send_audios,
'can_send_documents' => $can_send_documents,
'can_send_photos' => $can_send_photos,
'can_send_videos' => $can_send_videos,
'can_send_video_notes' => $can_send_video_notes,
'can_send_voice_notes' => $can_send_voice_notes,
'can_send_polls' => $can_send_polls,
'can_send_other_messages' => $can_send_other_messages,
'can_add_web_page_previews' => $can_add_web_page_previews,
'can_edit_tag' => $can_edit_tag,
'can_change_info' => $can_change_info,
'can_invite_users' => $can_invite_users,
'can_pin_messages' => $can_pin_messages,
'can_manage_topics' => $can_manage_topics,
]);
}
}