telegram-bot-api-nodejs 1.2.13 → 1.2.15
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 +12 -0
- package/index.js +6 -3
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -331,6 +331,7 @@ export interface Message {
|
|
|
331
331
|
caption_entities?: MessageEntity[];
|
|
332
332
|
audio?: Audio;
|
|
333
333
|
document?: Document;
|
|
334
|
+
paid_media?: PaidMediaInfo;
|
|
334
335
|
animation?: Animation;
|
|
335
336
|
game?: Game;
|
|
336
337
|
photo?: PhotoSize[];
|
|
@@ -548,6 +549,16 @@ export interface Voice extends FileBase {
|
|
|
548
549
|
duration: number;
|
|
549
550
|
mime_type?: string;
|
|
550
551
|
}
|
|
552
|
+
export interface PaidMediaInfo {
|
|
553
|
+
star_count: number;
|
|
554
|
+
paid_media: PaidMedia[];
|
|
555
|
+
}
|
|
556
|
+
export interface PaidMedia {
|
|
557
|
+
type: "preview";
|
|
558
|
+
width: number;
|
|
559
|
+
height: number;
|
|
560
|
+
duration: number;
|
|
561
|
+
}
|
|
551
562
|
export interface InputMediaBase {
|
|
552
563
|
media: string;
|
|
553
564
|
caption?: string;
|
|
@@ -1195,6 +1206,7 @@ export declare function isWrongFileIdentifierError(err: unknown): boolean;
|
|
|
1195
1206
|
export declare function isInvalidFileUrlSpecifiedError(err: unknown): boolean;
|
|
1196
1207
|
export declare function isMessageDeleteError(err: unknown): boolean;
|
|
1197
1208
|
export declare function isBotNotMemberGroupChatError(err: unknown): boolean;
|
|
1209
|
+
export declare function isGroupChatWasDeletedError(err: unknown): boolean;
|
|
1198
1210
|
export declare function isBusinessPeerUsageMissingError(err: unknown): boolean;
|
|
1199
1211
|
export declare function isInvalidPhotoDimensionsError(err: unknown): boolean;
|
|
1200
1212
|
export declare function parseRetryAfterTime(err: unknown): number;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readFileSync } from "fs";
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
2
|
/**
|
|
3
3
|
* Methods
|
|
4
4
|
*/
|
|
@@ -631,6 +631,10 @@ export function isMessageDeleteError(err) {
|
|
|
631
631
|
export function isBotNotMemberGroupChatError(err) {
|
|
632
632
|
return err instanceof Error && err.message === "Forbidden: bot is not a member of the group chat";
|
|
633
633
|
}
|
|
634
|
+
// Forbidden: the group chat was deleted
|
|
635
|
+
export function isGroupChatWasDeletedError(err) {
|
|
636
|
+
return err instanceof Error && err.message === "Forbidden: the group chat was deleted";
|
|
637
|
+
}
|
|
634
638
|
export function isBusinessPeerUsageMissingError(err) {
|
|
635
639
|
return err instanceof Error && err.message === "Bad Request: BUSINESS_PEER_USAGE_MISSING";
|
|
636
640
|
}
|
|
@@ -693,8 +697,7 @@ export function removeTokenFromUrl(url) {
|
|
|
693
697
|
return `bot${botId}:${"*".repeat(token.length)}`;
|
|
694
698
|
});
|
|
695
699
|
}
|
|
696
|
-
export
|
|
697
|
-
var currencies;
|
|
700
|
+
export var currencies;
|
|
698
701
|
(function (currencies_1) {
|
|
699
702
|
const __dirname = import.meta.dirname;
|
|
700
703
|
let currencies = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "telegram-bot-api-nodejs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15",
|
|
4
4
|
"description": "Telegram Bot API client for nodejs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^25.
|
|
28
|
+
"@types/node": "^25.5.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
31
|
+
"@typescript/native-preview": "^7.0.0-dev.20260407.1"
|
|
32
32
|
}
|
|
33
33
|
}
|