telegram-bot-api-nodejs 1.2.3 → 1.2.5

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 +4 -1
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1171,6 +1171,7 @@ export declare function isBotBlockedByUserError(err: unknown): boolean;
1171
1171
  export declare function isChatNotFoundError(err: unknown): boolean;
1172
1172
  export declare function isUserDeactivatedError(err: unknown): boolean;
1173
1173
  export declare function isBotKickedFromSupergroupError(err: unknown): boolean;
1174
+ export declare function isBotKickedFromGroupError(err: unknown): boolean;
1174
1175
  export declare function isNotEnoughRightsError(err: unknown): boolean;
1175
1176
  export declare function isUpgradeToSupergroupChatError(err: unknown): boolean;
1176
1177
  export declare function isTextMustBeNonEmptyError(err: unknown): boolean;
package/index.js CHANGED
@@ -569,7 +569,10 @@ export function isUserDeactivatedError(err) {
569
569
  return err instanceof Error && err.message.includes("Forbidden: user is deactivated");
570
570
  }
571
571
  export function isBotKickedFromSupergroupError(err) {
572
- return err instanceof Error && err.message.includes("Forbidden: bot was kicked from the supergroup chat");
572
+ return err instanceof Error && err.message === "Forbidden: bot was kicked from the supergroup chat";
573
+ }
574
+ export function isBotKickedFromGroupError(err) {
575
+ return err instanceof Error && err.message === "Forbidden: bot was kicked from the group chat";
573
576
  }
574
577
  export function isNotEnoughRightsError(err) {
575
578
  return err instanceof Error && err.message.includes("Bad Request: not enough rights to send text messages to the chat");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-bot-api-nodejs",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Telegram Bot API client for nodejs",
5
5
  "type": "module",
6
6
  "main": "index.js",