telegram-bot-api-nodejs 1.0.44 → 1.0.45

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.
Files changed (3) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1110,6 +1110,7 @@ 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;
1113
1114
  export declare function parseRetryAfterTime(err: unknown): number;
1114
1115
  export declare function resolveNameFromMessageOrigin(messageOrigin: MessageOrigin): string;
1115
1116
  export declare function resolveChatName(chat: any): string;
package/index.js CHANGED
@@ -580,6 +580,9 @@ 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
+ }
583
586
  export function parseRetryAfterTime(err) {
584
587
  if (!(err instanceof Error)) {
585
588
  throw new RangeError("`err` needs to be an Error");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-bot-api-nodejs",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Telegram Bot API client for nodejs",
5
5
  "type": "module",
6
6
  "main": "index.js",