link
Airgram instance
This page describes Airgram
public API.
Key | Type | Note |
---|---|---|
api | Object | Contains wrappers for all TDLib methods. |
config | Object | Airgram configuration. Readonly. |
catch | (handler) => void | Overrides default error handler. Argument handler takes a function: (error: Error, ctx?: Record<string, any>) => void |
on | Function | Set middleware callback for specific events. See details. |
use | Function | Set middleware callback for all events. See details. |
emit | Function | Fires new event. See details. |
provider.pause | () => void | Stop getting responses and updates from TDLib. Not available in web version. |
provider.resume | () => void | Continue getting responses and updates from TDLib. Not available in web version. |
provider.destroy | () => void | Destroy Airgram and TDLib instances. Not available in web version. |