Airgram

Guides
/
/
Methods

api.destroy()

Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization

Returns ApiResponse interface:
interface ApiResponse {
  _: 'destroy' | 'error'
  airgram: Airgram
  request: {
    method: 'destroy'
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}