Airgram

Guides
/
/
Methods

api.setOption()

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

Parameters SetOptionParams:

NameTypeDescription
namestring The name of the option
value The new value of the option; pass null to reset option value to a default value
Returns ApiResponse interface:
interface ApiResponse {
  _: 'setOption' | 'error'
  airgram: Airgram
  request: {
    method: 'setOption'
    params: SetOptionParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}