telegram-bot-api-nodejs 1.0.44 → 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 +3 -0
- package/index.js +9 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1110,6 +1110,9 @@ export declare function isUpgradeToSupergroupChatError(err: unknown): boolean;
|
|
|
1110
1110
|
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
|
+
export declare function isMessageCaptionTooLongError(err: unknown): boolean;
|
|
1114
|
+
export declare function isWebpageCurlFailedError(err: unknown): boolean;
|
|
1115
|
+
export declare function isWrongFileUrlError(err: unknown): boolean;
|
|
1113
1116
|
export declare function parseRetryAfterTime(err: unknown): number;
|
|
1114
1117
|
export declare function resolveNameFromMessageOrigin(messageOrigin: MessageOrigin): string;
|
|
1115
1118
|
export declare function resolveChatName(chat: any): string;
|
package/index.js
CHANGED
|
@@ -580,6 +580,15 @@ export function isTooManyRequestsError(err) {
|
|
|
580
580
|
export function isMessageTooLongError(err) {
|
|
581
581
|
return err instanceof Error && err.message.includes("message is too long");
|
|
582
582
|
}
|
|
583
|
+
export function isMessageCaptionTooLongError(err) {
|
|
584
|
+
return err instanceof Error && err.message.includes("message caption is too long");
|
|
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
|
+
}
|
|
583
592
|
export function parseRetryAfterTime(err) {
|
|
584
593
|
if (!(err instanceof Error)) {
|
|
585
594
|
throw new RangeError("`err` needs to be an Error");
|