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.
Files changed (3) hide show
  1. package/index.d.ts +5 -0
  2. package/index.js +8 -0
  3. 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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-bot-api-nodejs",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "description": "Telegram Bot API client for nodejs",
5
5
  "type": "module",
6
6
  "main": "index.js",