telegram-bot-api-nodejs 1.0.11 → 1.0.12
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 +2 -9
- package/index.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ export interface User {
|
|
|
117
117
|
last_name?: string;
|
|
118
118
|
username?: string;
|
|
119
119
|
language_code?: string;
|
|
120
|
-
is_premium
|
|
120
|
+
is_premium: boolean;
|
|
121
121
|
can_join_groups?: boolean;
|
|
122
122
|
supports_inline_queries?: boolean;
|
|
123
123
|
can_read_all_group_messages?: boolean;
|
|
@@ -579,14 +579,7 @@ export declare function deleteMyCommands(token: string, payload: DeleteMyCommand
|
|
|
579
579
|
*/
|
|
580
580
|
export declare function parseUpdate(update: any): Update;
|
|
581
581
|
export declare function parseMessage(m: any): Message;
|
|
582
|
-
export declare function parseUser(u: User):
|
|
583
|
-
id: string;
|
|
584
|
-
is_bot: boolean;
|
|
585
|
-
first_name: string;
|
|
586
|
-
last_name: string;
|
|
587
|
-
username: string;
|
|
588
|
-
language_code: string;
|
|
589
|
-
};
|
|
582
|
+
export declare function parseUser(u: User): User;
|
|
590
583
|
export declare function parseChat(c: Chat): {
|
|
591
584
|
id: number;
|
|
592
585
|
type: ChatType;
|
package/index.js
CHANGED
|
@@ -234,6 +234,7 @@ export function parseUser(u) {
|
|
|
234
234
|
last_name: String(u.last_name ?? ""),
|
|
235
235
|
username: String(u.username ?? ""),
|
|
236
236
|
language_code: String(u.language_code ?? ""),
|
|
237
|
+
is_premium: Boolean(u.is_premium ?? ""),
|
|
237
238
|
};
|
|
238
239
|
}
|
|
239
240
|
export function parseChat(c) {
|