Airgram

Guides

Airgram instance

This page describes Airgram public API.

KeyTypeNote
apiObjectContains wrappers for all TDLib methods.
configObjectAirgram configuration. Readonly.
catch(handler) => voidOverrides default error handler. Argument handler takes a function: (error: Error, ctx?: Record<string, any>) => void
onFunctionSet middleware callback for specific events. See details.
useFunctionSet middleware callback for all events. See details.
emitFunctionFires new event. See details.
provider.pause() => voidStop getting responses and updates from TDLib. Not available in web version.
provider.resume() => voidContinue getting responses and updates from TDLib. Not available in web version.
provider.destroy() => voidDestroy Airgram and TDLib instances. Not available in web version.