Skip to content

getOption

Sahri Riza Umami edited this page Jun 24, 2018 · 4 revisions

Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.)
Can be called before authorization.

getOption(name)
Field Type Description
name string The name of the option.

Example

  • Returns value of my_id

    getOption('my_id')

    Response:

    {
      ["@type"] = "optionValueInteger",
      value = 11223344
    }
  • Returns value of authorization_date

    getOption('authorization_date')

    Response:

    {
      ["@type"] = "optionValueInteger",
      value = 1518316196
    }

Frequently Asked Questions
The Functions

Clone this wiki locally