telegram-bot-api-nodejs 1.0.29 → 1.0.31
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 +5 -0
- package/index.js +3 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface SetWebHookOptions {
|
|
|
13
13
|
}
|
|
14
14
|
interface SendBasicOptions {
|
|
15
15
|
chat_id: number | string;
|
|
16
|
+
business_connection_id?: string;
|
|
16
17
|
message_thread_id?: number;
|
|
17
18
|
disable_notification?: boolean;
|
|
18
19
|
reply_to_message_id?: number | string;
|
|
@@ -189,7 +190,9 @@ export interface Message {
|
|
|
189
190
|
message_id: number;
|
|
190
191
|
message_thread_id?: number;
|
|
191
192
|
from?: User;
|
|
193
|
+
sender_business_bot?: User;
|
|
192
194
|
date: number;
|
|
195
|
+
business_connection_id?: string;
|
|
193
196
|
chat: Chat;
|
|
194
197
|
via_bot?: User;
|
|
195
198
|
forward_from?: User;
|
|
@@ -202,6 +205,7 @@ export interface Message {
|
|
|
202
205
|
is_automatic_forward?: boolean;
|
|
203
206
|
reply_to_message?: Message;
|
|
204
207
|
edit_date?: number;
|
|
208
|
+
is_from_offline?: boolean;
|
|
205
209
|
media_group_id?: string;
|
|
206
210
|
author_signature?: string;
|
|
207
211
|
text?: string;
|
|
@@ -765,4 +769,5 @@ export declare function isUserDeactivatedError(err: unknown): boolean;
|
|
|
765
769
|
export declare function isBotKickedFromSupergroupError(err: unknown): boolean;
|
|
766
770
|
export declare function isNotEnoughRightsError(err: unknown): boolean;
|
|
767
771
|
export declare function isUpgradeToSupergroupChatError(err: unknown): boolean;
|
|
772
|
+
export declare function isTextMustBeNonEmptyError(err: unknown): boolean;
|
|
768
773
|
export {};
|
package/index.js
CHANGED
|
@@ -562,3 +562,6 @@ export function isNotEnoughRightsError(err) {
|
|
|
562
562
|
export function isUpgradeToSupergroupChatError(err) {
|
|
563
563
|
return err instanceof Error && err.message.includes("Bad Request: group chat was upgraded to a supergroup chat");
|
|
564
564
|
}
|
|
565
|
+
export function isTextMustBeNonEmptyError(err) {
|
|
566
|
+
return err instanceof Error && err.message.includes("Bad Request: text must be non-empty");
|
|
567
|
+
}
|