telegram-bot-api-nodejs 1.0.45 → 1.0.46
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 +2 -0
- package/index.js +6 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1111,6 +1111,8 @@ export declare function isTextMustBeNonEmptyError(err: unknown): boolean;
|
|
|
1111
1111
|
export declare function isTooManyRequestsError(err: unknown): boolean;
|
|
1112
1112
|
export declare function isMessageTooLongError(err: unknown): boolean;
|
|
1113
1113
|
export declare function isMessageCaptionTooLongError(err: unknown): boolean;
|
|
1114
|
+
export declare function isWebpageCurlFailedError(err: unknown): boolean;
|
|
1115
|
+
export declare function isWrongFileUrlError(err: unknown): boolean;
|
|
1114
1116
|
export declare function parseRetryAfterTime(err: unknown): number;
|
|
1115
1117
|
export declare function resolveNameFromMessageOrigin(messageOrigin: MessageOrigin): string;
|
|
1116
1118
|
export declare function resolveChatName(chat: any): string;
|
package/index.js
CHANGED
|
@@ -583,6 +583,12 @@ export function isMessageTooLongError(err) {
|
|
|
583
583
|
export function isMessageCaptionTooLongError(err) {
|
|
584
584
|
return err instanceof Error && err.message.includes("message caption is too long");
|
|
585
585
|
}
|
|
586
|
+
export function isWebpageCurlFailedError(err) {
|
|
587
|
+
return err instanceof Error && err.message.includes("WEBPAGE_CURL_FAILED");
|
|
588
|
+
}
|
|
589
|
+
export function isWrongFileUrlError(err) {
|
|
590
|
+
return err instanceof Error && err.message.includes("Wrong file identifier/HTTP URL specified");
|
|
591
|
+
}
|
|
586
592
|
export function parseRetryAfterTime(err) {
|
|
587
593
|
if (!(err instanceof Error)) {
|
|
588
594
|
throw new RangeError("`err` needs to be an Error");
|