Airgram

Guides
/
/
Methods

api.sendCustomRequest()

Sends a custom request; for bots only

Parameters SendCustomRequestParams:

NameTypeDescription
methodstring The method name
parametersstring JSON-serialized method parameters
Returns ApiResponse interface:
interface ApiResponse {
  _: 'sendCustomRequest' | 'error'
  airgram: Airgram
  request: {
    method: 'sendCustomRequest'
    params: SendCustomRequestParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}