How to use the tdweb function in tdweb

To help you get started, we’ve selected a few tdweb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airgram / airgram / src / components / TdWebProvider.ts View on Github external
public initialize (
    handleUpdate: (update: Record) => Promise,
    handleError: (error: any) => void,
    models: ag.PlainObjectToModelTransformer
  ): void {
    this.handleUpdate = handleUpdate
    this.handleError = handleError
    this.models = models
    this.client = new TdWebClient({
      ...this.config,
      onUpdate: (update) => this.handleUpdate(this.deserialize(update))
    })
  }

tdweb

JavaScript interface for TDLib (Telegram library)

BSL-1.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Popular tdweb functions