MadelineProtoDocs/old_docs/API_docs_v97/constructors/chatBannedRights.md

51 lines
3.5 KiB
Markdown
Raw Normal View History

2019-05-03 21:10:09 +02:00
---
title: chatBannedRights
2019-12-27 17:48:04 +01:00
description: Represents the rights of a normal user in a [supergroup/channel/chat](https://core.telegram.org/api/channel). In this case, the flags are inverted: if set, a flag **does not allow** a user to do X.
2019-05-03 21:10:09 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: chatBannedRights
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Represents the rights of a normal user in a [supergroup/channel/chat](https://core.telegram.org/api/channel). In this case, the flags are inverted: if set, a flag **does not allow** a user to do X.
2019-05-03 21:10:09 +02:00
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|view\_messages|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to view messages in a [supergroup/channel/chat](https://core.telegram.org/api/channel)|
|send\_messages|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to send messages in a [supergroup/chat](https://core.telegram.org/api/channel)|
|send\_media|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to send any media in a [supergroup/chat](https://core.telegram.org/api/channel)|
|send\_stickers|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to send stickers in a [supergroup/chat](https://core.telegram.org/api/channel)|
|send\_gifs|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to send gifs in a [supergroup/chat](https://core.telegram.org/api/channel)|
|send\_games|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to send games in a [supergroup/chat](https://core.telegram.org/api/channel)|
|send\_inline|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to use inline bots in a [supergroup/chat](https://core.telegram.org/api/channel)|
|embed\_links|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to embed links in the messages of a [supergroup/chat](https://core.telegram.org/api/channel)|
|send\_polls|[Bool](../types/Bool.md) | Optional|If set, does not allow a user to send stickers in a [supergroup/chat](https://core.telegram.org/api/channel)|
|change\_info|[Bool](../types/Bool.md) | Optional|If set, does not allow any user to change the description of a [supergroup/chat](https://core.telegram.org/api/channel)|
|invite\_users|[Bool](../types/Bool.md) | Optional|If set, does not allow any user to invite users in a [supergroup/chat](https://core.telegram.org/api/channel)|
|pin\_messages|[Bool](../types/Bool.md) | Optional|If set, does not allow any user to pin messages in a [supergroup/chat](https://core.telegram.org/api/channel)|
|until\_date|[int](../types/int.md) | Yes|Validity of said permissions (0 = forever, forever = 2^31-1 for now).|
2019-05-03 21:10:09 +02:00
### Type: [ChatBannedRights](../types/ChatBannedRights.md)
### Example:
```php
$chatBannedRights = ['_' => 'chatBannedRights', 'view_messages' => Bool, 'send_messages' => Bool, 'send_media' => Bool, 'send_stickers' => Bool, 'send_gifs' => Bool, 'send_games' => Bool, 'send_inline' => Bool, 'embed_links' => Bool, 'send_polls' => Bool, 'change_info' => Bool, 'invite_users' => Bool, 'pin_messages' => Bool, 'until_date' => int];
```
Or, if you're into Lua:
```lua
chatBannedRights={_='chatBannedRights', view_messages=Bool, send_messages=Bool, send_media=Bool, send_stickers=Bool, send_gifs=Bool, send_games=Bool, send_inline=Bool, embed_links=Bool, send_polls=Bool, change_info=Bool, invite_users=Bool, pin_messages=Bool, until_date=int}
```