MadelineProtoDocs/docs/API_docs/constructors/chatAdminRights.md

46 lines
2.4 KiB
Markdown
Raw Normal View History

2019-03-08 13:49:23 +01:00
---
title: chatAdminRights
2019-12-27 17:48:04 +01:00
description: Represents the rights of an admin in a [channel/supergroup](https://core.telegram.org/api/channel).
2019-03-08 13:49:23 +01:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: chatAdminRights
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Represents the rights of an admin in a [channel/supergroup](https://core.telegram.org/api/channel).
2019-03-08 14:35:09 +01:00
2019-03-08 13:49:23 +01:00
### Attributes:
2019-03-08 14:35:09 +01:00
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|change\_info|[Bool](../types/Bool.md) | Optional|If set, allows the admin to modify the description of the [channel/supergroup](https://core.telegram.org/api/channel)|
|post\_messages|[Bool](../types/Bool.md) | Optional|If set, allows the admin to post messages in the [channel](https://core.telegram.org/api/channel)|
|edit\_messages|[Bool](../types/Bool.md) | Optional|If set, allows the admin to also edit messages from other admins in the [channel](https://core.telegram.org/api/channel)|
|delete\_messages|[Bool](../types/Bool.md) | Optional|If set, allows the admin to also delete messages from other admins in the [channel](https://core.telegram.org/api/channel)|
|ban\_users|[Bool](../types/Bool.md) | Optional|If set, allows the admin to ban users from the [channel/supergroup](https://core.telegram.org/api/channel)|
|invite\_users|[Bool](../types/Bool.md) | Optional|If set, allows the admin to invite users in the [channel/supergroup](https://core.telegram.org/api/channel)|
|pin\_messages|[Bool](../types/Bool.md) | Optional|If set, allows the admin to pin messages in the [channel/supergroup](https://core.telegram.org/api/channel)|
|add\_admins|[Bool](../types/Bool.md) | Optional|If set, allows the admin to add other admins with the same (or more limited) permissions in the [channel/supergroup](https://core.telegram.org/api/channel)|
2019-03-08 13:49:23 +01:00
### Type: [ChatAdminRights](../types/ChatAdminRights.md)
### Example:
```php
$chatAdminRights = ['_' => 'chatAdminRights', 'change_info' => Bool, 'post_messages' => Bool, 'edit_messages' => Bool, 'delete_messages' => Bool, 'ban_users' => Bool, 'invite_users' => Bool, 'pin_messages' => Bool, 'add_admins' => Bool];
```
Or, if you're into Lua:
```lua
chatAdminRights={_='chatAdminRights', change_info=Bool, post_messages=Bool, edit_messages=Bool, delete_messages=Bool, ban_users=Bool, invite_users=Bool, pin_messages=Bool, add_admins=Bool}
```