telegram-bot-api-nodejs 1.0.49 → 1.0.50
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 +1 -0
- package/index.js +3 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1116,6 +1116,7 @@ export declare function isMessageTooLongError(err: unknown): boolean;
|
|
|
1116
1116
|
export declare function isMessageCaptionTooLongError(err: unknown): boolean;
|
|
1117
1117
|
export declare function isWebpageCurlFailedError(err: unknown): boolean;
|
|
1118
1118
|
export declare function isWrongFileUrlError(err: unknown): boolean;
|
|
1119
|
+
export declare function isBadGatewayError(err: unknown): boolean;
|
|
1119
1120
|
export declare function parseRetryAfterTime(err: unknown): number;
|
|
1120
1121
|
export declare function resolveNameFromMessageOrigin(messageOrigin: MessageOrigin): string;
|
|
1121
1122
|
export declare function resolveChatName(chat: any): string;
|
package/index.js
CHANGED
|
@@ -600,6 +600,9 @@ export function isWebpageCurlFailedError(err) {
|
|
|
600
600
|
export function isWrongFileUrlError(err) {
|
|
601
601
|
return err instanceof Error && err.message.includes("Wrong file identifier/HTTP URL specified");
|
|
602
602
|
}
|
|
603
|
+
export function isBadGatewayError(err) {
|
|
604
|
+
return err instanceof Error && err.message === "Bad Gateway";
|
|
605
|
+
}
|
|
603
606
|
export function parseRetryAfterTime(err) {
|
|
604
607
|
if (!(err instanceof Error)) {
|
|
605
608
|
throw new RangeError("`err` needs to be an Error");
|