telegram-bot-api-nodejs 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -1
- package/index.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -486,7 +486,9 @@ interface BotCommand {
|
|
|
486
486
|
description: string;
|
|
487
487
|
}
|
|
488
488
|
export declare function setWebhook(token: string, body: SetWebHookOptions, signal: AbortSignal): Promise<Boolean>;
|
|
489
|
-
export declare function deleteWebhook(token: string,
|
|
489
|
+
export declare function deleteWebhook(token: string, params: {
|
|
490
|
+
drop_pending_updates?: boolean;
|
|
491
|
+
}, signal: AbortSignal): Promise<Boolean>;
|
|
490
492
|
/** @todo cehck if response is the same as in typings */
|
|
491
493
|
export declare function getWebhookInfo(token: string, signal: AbortSignal): Promise<WebhookInfo>;
|
|
492
494
|
export declare function getMe(token: string, signal: AbortSignal): Promise<User>;
|
package/index.js
CHANGED
|
@@ -13,10 +13,10 @@ export function setWebhook(token, body, signal) {
|
|
|
13
13
|
signal
|
|
14
14
|
}).then((parseResponse));
|
|
15
15
|
}
|
|
16
|
-
export function deleteWebhook(token, signal) {
|
|
16
|
+
export function deleteWebhook(token, params, signal) {
|
|
17
17
|
return fetch(`https://api.telegram.org/bot${token}/deleteWebhook`, {
|
|
18
18
|
method: "POST",
|
|
19
|
-
body: JSON.stringify(
|
|
19
|
+
body: JSON.stringify(params),
|
|
20
20
|
headers,
|
|
21
21
|
signal
|
|
22
22
|
}).then((parseResponse));
|