Skip to content

setOption

Sahri Riza Umami edited this page Jun 23, 2018 · 3 revisions

Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set.
Can be called before authorization.

setOption(name, option_value, value, callback, data)
Field Type Description
name string Name of the option.
option_value string Represents the value of an option.
value OptionValue New value of the option.

Example

  • Disable notifications about the user's contacts who have joined Telegram.

    setOption('disable_contact_registered_notifications', 'Boolean', 1)

    Response:

    {
      ["@type"] = "ok"
    }

Frequently Asked Questions
The Functions

Clone this wiki locally