telegram-bot-api-nodejs 1.0.41 → 1.0.42
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 +4 -0
- package/index.js +8 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1025,6 +1025,10 @@ export declare function getWebhookInfo(token: string, signal: AbortSignal): Prom
|
|
|
1025
1025
|
export declare function getMe(token: string, signal: AbortSignal): Promise<User>;
|
|
1026
1026
|
export declare function sendMessage(token: string, payload: SendMessageOptions, signal: AbortSignal): Promise<Message>;
|
|
1027
1027
|
export declare function editMessageText(token: string, payload: EditMessageTextOptions, signal: AbortSignal): Promise<Message>;
|
|
1028
|
+
export declare function deleteMessage(token: string, payload: {
|
|
1029
|
+
chat_id: string | number;
|
|
1030
|
+
message_id: number;
|
|
1031
|
+
}, signal: AbortSignal): Promise<{}>;
|
|
1028
1032
|
export declare function sendPhoto(token: string, payload: SendBasicOptions & {
|
|
1029
1033
|
photo: string;
|
|
1030
1034
|
caption?: string;
|
package/index.js
CHANGED
|
@@ -55,6 +55,14 @@ export function editMessageText(token, payload, signal) {
|
|
|
55
55
|
signal
|
|
56
56
|
}).then((parseResponse));
|
|
57
57
|
}
|
|
58
|
+
export function deleteMessage(token, payload, signal) {
|
|
59
|
+
return fetch(`https://api.telegram.org/bot${token}/deleteMessage`, {
|
|
60
|
+
method: "POST",
|
|
61
|
+
body: JSON.stringify(payload),
|
|
62
|
+
headers,
|
|
63
|
+
signal
|
|
64
|
+
}).then((parseResponse));
|
|
65
|
+
}
|
|
58
66
|
export function sendPhoto(token, payload, signal) {
|
|
59
67
|
return fetch(`https://api.telegram.org/bot${token}/sendPhoto`, {
|
|
60
68
|
method: "POST",
|