Interface LaunchOptions

Hierarchy

  • LaunchOptions

Properties

allowedUpdates?: UpdateType[]

List the types of updates you want your bot to receive

dropPendingUpdates?: boolean
webhook?: {
    cb?: RequestListener<typeof IncomingMessage, typeof ServerResponse>;
    certificate?: InputFile;
    domain: string;
    hookPath?: string;
    host?: string;
    ipAddress?: string;
    maxConnections?: number;
    path?: string;
    port?: number;
    secretToken?: string;
    tlsOptions?: TlsOptions;
}

Configuration options for when the bot is run via webhooks

Type declaration

  • Optional cb?: RequestListener<typeof IncomingMessage, typeof ServerResponse>
  • Optional certificate?: InputFile

    Upload your public key certificate so that the root certificate in use can be checked. See self-signed guide for details.

  • domain: string

    Public domain for webhook.

  • Optional hookPath?: string

    Webhook url path; will be automatically generated if not specified

    Deprecated

    Pass path instead

  • Optional host?: string
  • Optional ipAddress?: string

    The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS

  • Optional maxConnections?: number

    Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.

  • Optional path?: string

    Webhook url path; will be automatically generated if not specified

  • Optional port?: number
  • Optional secretToken?: string

    A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request. 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.

  • Optional tlsOptions?: TlsOptions

    TLS server options. Omit to use http.

Generated using TypeDoc