-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatAdministratorRights.php
More file actions
125 lines (104 loc) · 7.52 KB
/
Copy pathChatAdministratorRights.php
File metadata and controls
125 lines (104 loc) · 7.52 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
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/**
* This file is auto-generated.
*/
namespace Telepath\Telegram;
use Telepath\Types\Type;
/**
* Represents the rights of an administrator in a chat.
*/
class ChatAdministratorRights extends Type
{
/** <em>True</em>, if the user's presence in the chat is hidden */
public bool $is_anonymous;
/** <em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
public bool $can_manage_chat;
/** <em>True</em>, if the administrator can delete messages of other users */
public bool $can_delete_messages;
/** <em>True</em>, if the administrator can manage video chats */
public bool $can_manage_video_chats;
/** <em>True</em>, if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
public bool $can_restrict_members;
/** <em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user) */
public bool $can_promote_members;
/** <em>True</em>, if the user is allowed to change the chat title, photo and other settings */
public bool $can_change_info;
/** <em>True</em>, if the user is allowed to invite new users to the chat */
public bool $can_invite_users;
/** <em>True</em>, if the administrator can post stories to the chat */
public bool $can_post_stories;
/** <em>True</em>, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
public bool $can_edit_stories;
/** <em>True</em>, if the administrator can delete stories posted by other users */
public bool $can_delete_stories;
/** <em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
public ?bool $can_post_messages = null;
/** <em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; for channels only */
public ?bool $can_edit_messages = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; for groups and supergroups only */
public ?bool $can_pin_messages = null;
/** <em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
public ?bool $can_manage_topics = null;
/** <em>Optional</em>. <em>True</em>, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only */
public ?bool $can_manage_direct_messages = null;
/** <em>Optional</em>. <em>True</em>, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages. */
public ?bool $can_manage_tags = null;
/**
* @param bool $is_anonymous <em>True</em>, if the user's presence in the chat is hidden
* @param bool $can_manage_chat <em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
* @param bool $can_delete_messages <em>True</em>, if the administrator can delete messages of other users
* @param bool $can_manage_video_chats <em>True</em>, if the administrator can manage video chats
* @param bool $can_restrict_members <em>True</em>, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
* @param bool $can_promote_members <em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
* @param bool $can_change_info <em>True</em>, if the user is allowed to change the chat title, photo and other settings
* @param bool $can_invite_users <em>True</em>, if the user is allowed to invite new users to the chat
* @param bool $can_post_stories <em>True</em>, if the administrator can post stories to the chat
* @param bool $can_edit_stories <em>True</em>, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive
* @param bool $can_delete_stories <em>True</em>, if the administrator can delete stories posted by other users
* @param bool $can_post_messages <em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
* @param bool $can_edit_messages <em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; for channels only
* @param bool $can_pin_messages <em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; for groups and supergroups only
* @param bool $can_manage_topics <em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
* @param bool $can_manage_direct_messages <em>Optional</em>. <em>True</em>, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
* @param bool $can_manage_tags <em>Optional</em>. <em>True</em>, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can_pin_messages.
*/
public static function make(
bool $is_anonymous,
bool $can_manage_chat,
bool $can_delete_messages,
bool $can_manage_video_chats,
bool $can_restrict_members,
bool $can_promote_members,
bool $can_change_info,
bool $can_invite_users,
bool $can_post_stories,
bool $can_edit_stories,
bool $can_delete_stories,
?bool $can_post_messages = null,
?bool $can_edit_messages = null,
?bool $can_pin_messages = null,
?bool $can_manage_topics = null,
?bool $can_manage_direct_messages = null,
?bool $can_manage_tags = null,
): static {
return new static([
'is_anonymous' => $is_anonymous,
'can_manage_chat' => $can_manage_chat,
'can_delete_messages' => $can_delete_messages,
'can_manage_video_chats' => $can_manage_video_chats,
'can_restrict_members' => $can_restrict_members,
'can_promote_members' => $can_promote_members,
'can_change_info' => $can_change_info,
'can_invite_users' => $can_invite_users,
'can_post_stories' => $can_post_stories,
'can_edit_stories' => $can_edit_stories,
'can_delete_stories' => $can_delete_stories,
'can_post_messages' => $can_post_messages,
'can_edit_messages' => $can_edit_messages,
'can_pin_messages' => $can_pin_messages,
'can_manage_topics' => $can_manage_topics,
'can_manage_direct_messages' => $can_manage_direct_messages,
'can_manage_tags' => $can_manage_tags,
]);
}
}