1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-15 11:26:56 +01:00
MadelineProto/old_docs/API_docs_v23/constructors/chat.md

49 lines
1.1 KiB
Markdown
Raw Normal View History

---
title: chat
description: chat attributes, type and example
---
## Constructor: chat
[Back to constructors index](index.md)
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|
|id|[int](../types/int.md) | Yes|
|title|[string](../types/string.md) | Yes|
|photo|[ChatPhoto](../types/ChatPhoto.md) | Yes|
|participants\_count|[int](../types/int.md) | Yes|
|date|[int](../types/int.md) | Yes|
|left|[Bool](../types/Bool.md) | Yes|
|version|[int](../types/int.md) | Yes|
### Type: [Chat](../types/Chat.md)
### Example:
```
2017-07-23 16:33:46 +02:00
$chat = ['_' => 'chat', 'id' => int, 'title' => 'string', 'photo' => ChatPhoto, 'participants_count' => int, 'date' => int, 'left' => Bool, 'version' => int];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2017-07-23 16:33:46 +02:00
{"_": "chat", "id": int, "title": "string", "photo": ChatPhoto, "participants_count": int, "date": int, "left": Bool, "version": int}
2017-07-23 16:11:02 +02:00
```
Or, if you're into Lua:
```
2017-07-23 16:33:46 +02:00
chat={_='chat', id=int, title='string', photo=ChatPhoto, participants_count=int, date=int, left=Bool, version=int}
```