telegram-bot-api-nodejs 1.0.31 → 1.0.32
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
|
@@ -770,4 +770,5 @@ export declare function isBotKickedFromSupergroupError(err: unknown): boolean;
|
|
|
770
770
|
export declare function isNotEnoughRightsError(err: unknown): boolean;
|
|
771
771
|
export declare function isUpgradeToSupergroupChatError(err: unknown): boolean;
|
|
772
772
|
export declare function isTextMustBeNonEmptyError(err: unknown): boolean;
|
|
773
|
+
export declare function isTooManyRequestsError(err: unknown): boolean;
|
|
773
774
|
export {};
|
package/index.js
CHANGED
|
@@ -565,3 +565,6 @@ export function isUpgradeToSupergroupChatError(err) {
|
|
|
565
565
|
export function isTextMustBeNonEmptyError(err) {
|
|
566
566
|
return err instanceof Error && err.message.includes("Bad Request: text must be non-empty");
|
|
567
567
|
}
|
|
568
|
+
export function isTooManyRequestsError(err) {
|
|
569
|
+
return err instanceof Error && err.message.includes("Too Many Requests: retry after");
|
|
570
|
+
}
|