Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>Config_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Config_
extends _Config_
import { Config_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Current configuration

Constructors

new
Config_(params: { default_p2p_contacts?: true; preload_featured_stickers?: true; revoke_pm_inbox?: true; blocked_mode?: true; force_try_ipv6?: true; date: number; expires: number; test_mode: boolean; this_dc: number; dc_options: Array<enums.DcOption>; dc_txt_domain_name: string; chat_size_max: number; megagroup_size_max: number; forwarded_count_max: number; online_update_period_ms: number; offline_blur_timeout_ms: number; offline_idle_timeout_ms: number; online_cloud_timeout_ms: number; notify_cloud_delay_ms: number; notify_default_delay_ms: number; push_chat_period_ms: number; push_chat_limit: number; edit_time_limit: number; revoke_time_limit: number; revoke_pm_time_limit: number; rating_e_decay: number; stickers_recent_limit: number; channels_read_media_period: number; tmp_sessions?: number; call_receive_timeout_ms: number; call_ring_timeout_ms: number; call_connect_timeout_ms: number; call_packet_timeout_ms: number; me_url_prefix: string; autoupdate_url_prefix?: string; gif_search_username?: string; venue_search_username?: string; img_search_username?: string; static_maps_provider?: string; caption_length_max: number; message_length_max: number; webfile_dc_id: number; suggested_lang_code?: string; lang_pack_version?: number; base_lang_pack_version?: number; reactions_default?: enums.Reaction; autologin_token?: string; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
optional
autologin_token: string
optional
autoupdate_url_prefix: string

URL to use to auto-update the current app

optional
base_lang_pack_version: number

Basic language pack version

optional
blocked_mode: true

Indicates that telegram is probably censored by governments/ISPs in the current region

call_connect_timeout_ms: number

VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted

call_packet_timeout_ms: number

If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted

call_receive_timeout_ms: number

Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call

call_ring_timeout_ms: number

Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused

caption_length_max: number

Maximum length of caption (length in utf8 codepoints)

channels_read_media_period: number

Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read

chat_size_max: number

Maximum member count for normal groups

date: number

Current date at the server

dc_options: Array<enums.DcOption>

DC IP list

dc_txt_domain_name: string

Domain name for fetching encrypted DC list from DNS TXT record

optional
default_p2p_contacts: true

Whether the client should use P2P by default for phone calls with contacts

edit_time_limit: number

Only messages with age smaller than the one specified can be edited

expires: number

Expiration date of this config: when it expires it'll have to be refetched using help.getConfig

optional
force_try_ipv6: true

Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available.

forwarded_count_max: number

Maximum number of messages that can be forwarded at once using messages.forwardMessages.

optional
gif_search_username: string

Username of the bot to use to search for GIFs

optional
img_search_username: string

Username of the bot to use for image search

optional
lang_pack_version: number

Language pack version

me_url_prefix: string

The domain to use to parse deep links ».

megagroup_size_max: number

Maximum member count for supergroups

message_length_max: number

Maximum length of messages (length in utf8 codepoints)

notify_cloud_delay_ms: number

If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds.

notify_default_delay_ms: number

If some other client is online, then delay notification for notification_default_delay_ms milliseconds

offline_blur_timeout_ms: number

Delay before offline status needs to be sent to the server

offline_idle_timeout_ms: number

Time without any user activity after which it should be treated offline

online_cloud_timeout_ms: number

If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds.

online_update_period_ms: number

The client should update its online status every N milliseconds

push_chat_limit: number

Not for client use

push_chat_period_ms: number

Not for client use

rating_e_decay: number

Exponential decay rate for computing top peer rating

optional
reactions_default: enums.Reaction
optional
revoke_pm_inbox: true

Whether incoming private messages can be deleted for both participants

revoke_pm_time_limit: number

Only private messages with age smaller than the specified can be deleted

revoke_time_limit: number

Only channel/supergroup messages with age smaller than the specified can be deleted

optional
static_maps_provider: string

ID of the map provider to use for venues

stickers_recent_limit: number

Maximum number of recent stickers

optional
suggested_lang_code: string

Suggested language code

test_mode: boolean

Whether we're connected to the test DCs

this_dc: number

ID of the DC that returned the reply

optional
tmp_sessions: number

Temporary passport sessions

optional
venue_search_username: string

Username of the bot to use to search for venues

webfile_dc_id: number

DC ID to use to download webfiles

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc