telegram-bot-api-nodejs 1.0.74 → 1.0.75
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 +5 -0
- package/index.js +8 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1072,6 +1072,11 @@ export declare function sendAnimation(token: string, payload: SendAnimationOptio
|
|
|
1072
1072
|
* sendDocument("token", payload)
|
|
1073
1073
|
*/
|
|
1074
1074
|
export declare function sendDocument(token: string, payload: SendDocumentOptions | FormData, signal: AbortSignal): Promise<Message>;
|
|
1075
|
+
export declare function sendVideo(token: string, payload: SendBasicOptions & {
|
|
1076
|
+
video: string;
|
|
1077
|
+
caption?: string;
|
|
1078
|
+
parse_mode?: ParseMode;
|
|
1079
|
+
}, signal: AbortSignal): Promise<Message>;
|
|
1075
1080
|
export declare function sendVoice(token: string, payload: SendBasicOptions & {
|
|
1076
1081
|
voice: string;
|
|
1077
1082
|
caption?: string;
|
package/index.js
CHANGED
|
@@ -119,6 +119,14 @@ export function sendDocument(token, payload, signal) {
|
|
|
119
119
|
signal
|
|
120
120
|
}).then((parseResponse));
|
|
121
121
|
}
|
|
122
|
+
export function sendVideo(token, payload, signal) {
|
|
123
|
+
return fetch(`https://api.telegram.org/bot${token}/sendVideo`, {
|
|
124
|
+
method: "POST",
|
|
125
|
+
body: JSON.stringify(payload),
|
|
126
|
+
headers,
|
|
127
|
+
signal
|
|
128
|
+
}).then((parseResponse));
|
|
129
|
+
}
|
|
122
130
|
export function sendVoice(token, payload, signal) {
|
|
123
131
|
return fetch(`https://api.telegram.org/bot${token}/sendVoice`, {
|
|
124
132
|
method: "POST",
|