SetWebHookOptions missing ip_address
It seems like that SetWebHookOptions is missing the flag ip_address which might be important since Telegram doesnt update DNS very often.
interface SetWebHookOptions {
url?: string | undefined;
certificate?: string | Stream | undefined;
max_connections?: number | undefined;
allowed_updates?: string[] | undefined;
secret_token?: string | undefined;
}
should be
interface SetWebHookOptions {
url?: string | undefined;
certificate?: string | Stream | undefined;
max_connections?: number | undefined;
allowed_updates?: string[] | undefined;
secret_token?: string | undefined;
ip_address?:string | undefined
}
hii @mynote is this issue still open, can i work on it?
This is supported in the current TypeScript rewrite (v1.1.0+). setWebhook's options are typed as Omit<SetWebhookParams, "url">, and the generated SetWebhookParams includes ip_address:
bot.setWebhook(url, { ip_address: "1.2.3.4", max_connections: 40 });
The gap you hit was in the separate @types/node-telegram-bot-api (DefinitelyTyped) package used with the old 0.x release. The rewritten library ships its own types generated from the Bot API docs, so ip_address (and the rest of setWebhook's documented params) are present. Closing as resolved.