Airgram

Guides
/
/
Methods

api.pingProxy()

Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization

Parameters PingProxyParams:

NameTypeDescription
proxyIdnumber Proxy identifier. Use 0 to ping a Telegram server without a proxy
Returns ApiResponse interface:
interface ApiResponse {
  _: 'pingProxy' | 'error'
  airgram: Airgram
  request: {
    method: 'pingProxy'
    params: PingProxyParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}