The connection instance to be used when creating a new connection to the servers. It must be a type.
Defaults to {@link ConnectionTCPFull} on Node and {@link ConnectionTCPObfuscated} on browsers.
Whether to connect to the servers through IPv6 or not. By default this is false.
The timeout in seconds to be used when connecting. This does nothing for now.
How many times a request should be retried.
Request are retried when Telegram is having internal issues (due to INTERNAL error or RPC_CALL_FAIL error),
when there is a errors.FloodWaitError less than floodSleepThreshold, or when there's a migrate error.
defaults to 5.
How many times the reconnection should retry, either on the initial connection or when Telegram disconnects us.
May be set to a negative or undefined value for infinite retries, but this is not recommended, since the program can get stuck in an infinite loop.
defaults to 5
Experimental proxy to be used for the connection. (only supports MTProxies)
How many times we should retry borrowing a sender from another DC when it fails. defaults to 5
The delay in milliseconds to sleep between automatic reconnections. defaults to 1000
Whether reconnection should be retried connection_retries times automatically if Telegram disconnects us or not. defaults to true
does nothing for now
The threshold below which the library should automatically sleep on flood wait and slow mode wait errors (inclusive).
For instance, if a FloodWaitError for 17s occurs and floodSleepThreshold is 20s, the library will sleep automatically.
If the error was for 21s, it would raise FloodWaitError instead. defaults to 60 sec.
Device model to be sent when creating the initial connection. Defaults to os.type().toString().
System version to be sent when creating the initial connection. defaults to os.release().toString() -.
App version to be sent when creating the initial connection. Defaults to 1.0.
Language code to be sent when creating the initial connection. Defaults to 'en'.
System lang code to be sent when creating the initial connection. Defaults to 'en'.
Instance of Logger to use.
If a Logger
is given, it'll be used directly. If nothing is given, the default logger will be used.
To create your own Logger make sure you extends GramJS logger Logger and override log
method.
Whether to try to connect over Wss (or 443 port) or not.
Limits how many downloads happen at the same time.
Whether to check for tampering in messages or not.
Only for web DCs. Whether to use test servers or not.
What type of network connection to use (Normal Socket (for node) or Websockets (for browsers usually) )
Generated using TypeDoc
Interface for creating a new client. All of these have a default value and you should only change those if you know what you are doing.