2017-01-02 19:50:37 +01:00
|
|
|
---
|
|
|
|
title: config
|
|
|
|
description: config attributes, type and example
|
|
|
|
---
|
|
|
|
## Constructor: config
|
|
|
|
[Back to constructors index](index.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Attributes:
|
|
|
|
|
|
|
|
| Name | Type | Required |
|
2017-08-20 11:05:56 +02:00
|
|
|
|----------|---------------|----------|
|
2017-03-11 19:54:51 +01:00
|
|
|
|date|[int](../types/int.md) | Yes|
|
|
|
|
|expires|[int](../types/int.md) | Yes|
|
|
|
|
|test\_mode|[Bool](../types/Bool.md) | Yes|
|
|
|
|
|this\_dc|[int](../types/int.md) | Yes|
|
|
|
|
|dc\_options|Array of [DcOption](../types/DcOption.md) | Yes|
|
|
|
|
|chat\_size\_max|[int](../types/int.md) | Yes|
|
|
|
|
|megagroup\_size\_max|[int](../types/int.md) | Yes|
|
|
|
|
|forwarded\_count\_max|[int](../types/int.md) | Yes|
|
|
|
|
|online\_update\_period\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|offline\_blur\_timeout\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|offline\_idle\_timeout\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|online\_cloud\_timeout\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|notify\_cloud\_delay\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|notify\_default\_delay\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|chat\_big\_size|[int](../types/int.md) | Yes|
|
|
|
|
|push\_chat\_period\_ms|[int](../types/int.md) | Yes|
|
|
|
|
|push\_chat\_limit|[int](../types/int.md) | Yes|
|
|
|
|
|saved\_gifs\_limit|[int](../types/int.md) | Yes|
|
|
|
|
|edit\_time\_limit|[int](../types/int.md) | Yes|
|
|
|
|
|rating\_e\_decay|[int](../types/int.md) | Yes|
|
|
|
|
|stickers\_recent\_limit|[int](../types/int.md) | Yes|
|
2017-01-02 19:50:37 +01:00
|
|
|
|tmp\_sessions|[int](../types/int.md) | Optional|
|
2017-03-11 19:54:51 +01:00
|
|
|
|disabled\_features|Array of [DisabledFeature](../types/DisabledFeature.md) | Yes|
|
2017-01-02 19:50:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Type: [Config](../types/Config.md)
|
|
|
|
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
$config = ['_' => 'config', 'date' => int, 'expires' => int, 'test_mode' => Bool, 'this_dc' => int, 'dc_options' => [DcOption], 'chat_size_max' => int, 'megagroup_size_max' => int, 'forwarded_count_max' => int, 'online_update_period_ms' => int, 'offline_blur_timeout_ms' => int, 'offline_idle_timeout_ms' => int, 'online_cloud_timeout_ms' => int, 'notify_cloud_delay_ms' => int, 'notify_default_delay_ms' => int, 'chat_big_size' => int, 'push_chat_period_ms' => int, 'push_chat_limit' => int, 'saved_gifs_limit' => int, 'edit_time_limit' => int, 'rating_e_decay' => int, 'stickers_recent_limit' => int, 'tmp_sessions' => int, 'disabled_features' => [DisabledFeature]];
|
Added docs for layer 18, 23, 25, 27, 33, 38, 40, 41, 42, 44, 45, 46, 51, 53, 55
2017-01-02 21:04:36 +01:00
|
|
|
```
|
|
|
|
|
2017-07-23 16:11:02 +02:00
|
|
|
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
{"_": "config", "date": int, "expires": int, "test_mode": Bool, "this_dc": int, "dc_options": [DcOption], "chat_size_max": int, "megagroup_size_max": int, "forwarded_count_max": int, "online_update_period_ms": int, "offline_blur_timeout_ms": int, "offline_idle_timeout_ms": int, "online_cloud_timeout_ms": int, "notify_cloud_delay_ms": int, "notify_default_delay_ms": int, "chat_big_size": int, "push_chat_period_ms": int, "push_chat_limit": int, "saved_gifs_limit": int, "edit_time_limit": int, "rating_e_decay": int, "stickers_recent_limit": int, "tmp_sessions": int, "disabled_features": [DisabledFeature]}
|
2017-07-23 16:11:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-03-11 19:54:51 +01:00
|
|
|
Or, if you're into Lua:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
config={_='config', date=int, expires=int, test_mode=Bool, this_dc=int, dc_options={DcOption}, chat_size_max=int, megagroup_size_max=int, forwarded_count_max=int, online_update_period_ms=int, offline_blur_timeout_ms=int, offline_idle_timeout_ms=int, online_cloud_timeout_ms=int, notify_cloud_delay_ms=int, notify_default_delay_ms=int, chat_big_size=int, push_chat_period_ms=int, push_chat_limit=int, saved_gifs_limit=int, edit_time_limit=int, rating_e_decay=int, stickers_recent_limit=int, tmp_sessions=int, disabled_features={DisabledFeature}}
|
2017-03-11 19:54:51 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|