telegram-bot-api-nodejs 1.2.3 → 1.2.4
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 +16 -15
- package/index.js +4 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1166,21 +1166,22 @@ export declare class TelegramError extends Error {
|
|
|
1166
1166
|
*/
|
|
1167
1167
|
export declare function fetch(url: string, param?: RequestInit): Promise<Response>;
|
|
1168
1168
|
export declare const SUPPORTED_REACTION_EMOJI: string[];
|
|
1169
|
-
export declare function isUnauthorizedError(err: unknown):
|
|
1170
|
-
export declare function isBotBlockedByUserError(err: unknown):
|
|
1171
|
-
export declare function isChatNotFoundError(err: unknown):
|
|
1172
|
-
export declare function isUserDeactivatedError(err: unknown):
|
|
1173
|
-
export declare function isBotKickedFromSupergroupError(err: unknown):
|
|
1174
|
-
export declare function
|
|
1175
|
-
export declare function
|
|
1176
|
-
export declare function
|
|
1177
|
-
export declare function
|
|
1178
|
-
export declare function
|
|
1179
|
-
export declare function
|
|
1180
|
-
export declare function
|
|
1181
|
-
export declare function
|
|
1182
|
-
export declare function
|
|
1183
|
-
export declare function
|
|
1169
|
+
export declare function isUnauthorizedError(err: unknown): err is Error;
|
|
1170
|
+
export declare function isBotBlockedByUserError(err: unknown): err is Error;
|
|
1171
|
+
export declare function isChatNotFoundError(err: unknown): err is Error;
|
|
1172
|
+
export declare function isUserDeactivatedError(err: unknown): err is Error;
|
|
1173
|
+
export declare function isBotKickedFromSupergroupError(err: unknown): err is Error;
|
|
1174
|
+
export declare function isBotKickedFromGroupError(err: unknown): err is Error;
|
|
1175
|
+
export declare function isNotEnoughRightsError(err: unknown): err is Error;
|
|
1176
|
+
export declare function isUpgradeToSupergroupChatError(err: unknown): err is Error;
|
|
1177
|
+
export declare function isTextMustBeNonEmptyError(err: unknown): err is Error;
|
|
1178
|
+
export declare function isTooManyRequestsError(err: unknown): err is Error;
|
|
1179
|
+
export declare function isMessageTooLongError(err: unknown): err is Error;
|
|
1180
|
+
export declare function isMessageCaptionTooLongError(err: unknown): err is Error;
|
|
1181
|
+
export declare function isWebpageCurlFailedError(err: unknown): err is Error;
|
|
1182
|
+
export declare function isWrongFileUrlError(err: unknown): err is Error;
|
|
1183
|
+
export declare function isBadGatewayError(err: unknown): err is Error;
|
|
1184
|
+
export declare function isMessageToEditNotFoundError(err: unknown): err is Error;
|
|
1184
1185
|
export declare function isMessageToDeleteNotFoundError(err: unknown): boolean;
|
|
1185
1186
|
export declare function isMessageNotModifiedError(err: unknown): boolean;
|
|
1186
1187
|
export declare function isWrongTypeOfTheWebPageContentError(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
|
|
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");
|