MadelineProtoDocs/old_docs/API_docs_v33/constructors/config.md

60 lines
2.9 KiB
Markdown
Raw Normal View History

2018-04-01 13:24:46 +02:00
---
title: config
description: config attributes, type and example
2018-04-04 19:52:48 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
2018-04-01 13:24:46 +02:00
---
2018-04-05 01:19:57 +02:00
# Constructor: config
2018-04-01 13:24:46 +02:00
[Back to constructors index](index.md)
### Attributes:
| Name | Type | Required |
|----------|---------------|----------|
|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|
|broadcast\_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|
|disabled\_features|Array of [DisabledFeature](../types/DisabledFeature.md) | Yes|
### Type: [Config](../types/Config.md)
### Example:
```php
2018-04-01 13:24:46 +02:00
$config = ['_' => 'config', 'date' => int, 'expires' => int, 'test_mode' => Bool, 'this_dc' => int, 'dc_options' => [DcOption, DcOption], 'chat_size_max' => int, 'broadcast_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, 'disabled_features' => [DisabledFeature, DisabledFeature]];
```
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
{"_": "config", "date": int, "expires": int, "test_mode": Bool, "this_dc": int, "dc_options": [DcOption], "chat_size_max": int, "broadcast_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, "disabled_features": [DisabledFeature]}
```
Or, if you're into Lua:
2018-04-01 13:24:46 +02:00
```lua
2018-04-01 13:24:46 +02:00
config={_='config', date=int, expires=int, test_mode=Bool, this_dc=int, dc_options={DcOption}, chat_size_max=int, broadcast_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, disabled_features={DisabledFeature}}
```