Skip to main content

config

Current configuration

type tg.Config struct { /* ... */ }

Fields

NameTypeRequiredDescription
DefaultP2PContactsboolWhether the client should use P2P by default for phone calls with contacts
PreloadFeaturedStickersboolWhether the client should preload featured stickers
RevokePmInboxboolWhether incoming private messages can be deleted for both participants
BlockedModeboolIndicates that telegram is probably censored by governments/ISPs in the current region
ForceTryIpv6boolWhether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available.
DateintyesCurrent date at the server
ExpiresintyesExpiration date of this config: when it expires it'll have to be refetched using help getConfig
TestModeboolWhether we're connected to the test DCs
ThisDCintyesID of the DC that returned the reply
DCOptions[]DCOptionyesDC IP list
DCTxtDomainNamestringyesDomain name for fetching encrypted DC list from DNS TXT record
ChatSizeMaxintyesMaximum member count for normal groups
MegagroupSizeMaxintyesMaximum member count for supergroups
ForwardedCountMaxintyesMaximum number of messages that can be forwarded at once using messages forwardMessages.
OnlineUpdatePeriodMsintyesThe client should update its online status every N milliseconds
OfflineBlurTimeoutMsintyesDelay before offline status needs to be sent to the server
OfflineIdleTimeoutMsintyesTime without any user activity after which it should be treated offline
OnlineCloudTimeoutMsintyesIf 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.
NotifyCloudDelayMsintyesIf we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds.
NotifyDefaultDelayMsintyesIf some other client is online, then delay notification for notification_default_delay_ms milliseconds
PushChatPeriodMsintyesNot for client use
PushChatLimitintyesNot for client use
EditTimeLimitintyesOnly messages with age smaller than the one specified can be edited
RevokeTimeLimitintyesOnly channel/supergroup messages with age smaller than the specified can be deleted
RevokePmTimeLimitintyesOnly private messages with age smaller than the specified can be deleted
RatingEDecayintyesExponential decay rate for computing top peer rating
StickersRecentLimitintyesMaximum number of recent stickers
ChannelsReadMediaPeriodintyesIndicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read
TmpSessionsintTemporary passport sessions
CallReceiveTimeoutMsintyesMaximum 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
CallRingTimeoutMsintyesMaximum 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
CallConnectTimeoutMsintyesVoIP 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
CallPacketTimeoutMsintyesIf during a VoIP call a packet isn't received for the specified period of time, the call must be aborted
MeURLPrefixstringyesThe domain to use to parse deep links ».
AutoupdateURLPrefixstringURL to use to auto-update the current app
GifSearchUsernamestringUsername of the bot to use to search for GIFs
VenueSearchUsernamestringUsername of the bot to use to search for venues
ImgSearchUsernamestringUsername of the bot to use for image search
StaticMapsProviderstringID of the map provider to use for venues
CaptionLengthMaxintyesMaximum length of caption (length in utf8 codepoints)
MessageLengthMaxintyesMaximum length of messages (length in utf8 codepoints)
WebfileDCIDintyesDC ID to use to download webfiles
SuggestedLangCodestringSuggested language code
LangPackVersionintLanguage pack version
BaseLangPackVersionintBasic language pack version
ReactionsDefaultReactionClassDefault message reaction
AutologinTokenstringAutologin token, click here for more info on URL authorization ».

Returned by

References