@mtkruto/node 0.1.136 → 0.1.138
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/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_utilities.d.ts +9 -3
- package/esm/types/6_update.d.ts +1 -1
- package/package.json +1 -1
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_utilities.d.ts +9 -3
- package/script/types/6_update.d.ts +1 -1
package/esm/4_constants.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type PublicKeys = readonly [bigint, [bigint, bigint]][];
|
|
|
4
4
|
export declare const PUBLIC_KEYS: PublicKeys;
|
|
5
5
|
export declare const INITIAL_DC: DC;
|
|
6
6
|
export declare const LAYER = 169;
|
|
7
|
-
export declare const APP_VERSION = "MTKruto 0.1.
|
|
7
|
+
export declare const APP_VERSION = "MTKruto 0.1.138";
|
|
8
8
|
export declare const DEVICE_MODEL: string;
|
|
9
9
|
export declare const LANG_CODE: string;
|
|
10
10
|
export declare const LANG_PACK = "";
|
package/esm/4_constants.js
CHANGED
|
@@ -53,7 +53,7 @@ export const PUBLIC_KEYS = Object.freeze([
|
|
|
53
53
|
]);
|
|
54
54
|
export const INITIAL_DC = "2";
|
|
55
55
|
export const LAYER = 169;
|
|
56
|
-
export const APP_VERSION = "MTKruto 0.1.
|
|
56
|
+
export const APP_VERSION = "MTKruto 0.1.138";
|
|
57
57
|
// @ts-ignore: lib
|
|
58
58
|
export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
59
59
|
export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
|
@@ -33,12 +33,18 @@ type Msg<T> = "message" extends keyof T ? T & {
|
|
|
33
33
|
} : "callbackQuery" extends keyof T ? "message" extends keyof T["callbackQuery"] ? T & {
|
|
34
34
|
msg: T["callbackQuery"]["message"];
|
|
35
35
|
} : T : T;
|
|
36
|
-
type From<T> = "callbackQuery"
|
|
36
|
+
type From<T> = "callbackQuery" extends keyof T ? T & {
|
|
37
37
|
from: User;
|
|
38
|
-
} : "
|
|
38
|
+
} : "inlineQuery" extends keyof T ? T & {
|
|
39
|
+
from: User;
|
|
40
|
+
} : "message" extends keyof T ? T & {
|
|
41
|
+
from?: User;
|
|
42
|
+
} : "editedMessage" extends keyof T ? T & {
|
|
39
43
|
from?: User;
|
|
40
44
|
} : T;
|
|
41
|
-
type SenderChat<T> = "message"
|
|
45
|
+
type SenderChat<T> = "message" extends keyof T ? T & {
|
|
46
|
+
senderChat?: ChatP;
|
|
47
|
+
} : "editedMessage" extends keyof T ? T & {
|
|
42
48
|
senderChat?: ChatP;
|
|
43
49
|
} : T;
|
|
44
50
|
type Shortcuts<T> = SenderChat<From<Chat<Msg<T>>>>;
|
package/esm/types/6_update.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export interface UpdateAuthorizationState {
|
|
|
46
46
|
*
|
|
47
47
|
* ```
|
|
48
48
|
* // Handle text messages
|
|
49
|
-
* client.on(
|
|
49
|
+
* client.on("message:text", (ctx) => {
|
|
50
50
|
* const receivedOrSent = ctx.message.out ? "sent" : "received";
|
|
51
51
|
* console.log("Just", receivedOrSent, "a text message:", ctx.message.text);
|
|
52
52
|
* });
|
package/package.json
CHANGED
package/script/4_constants.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type PublicKeys = readonly [bigint, [bigint, bigint]][];
|
|
|
4
4
|
export declare const PUBLIC_KEYS: PublicKeys;
|
|
5
5
|
export declare const INITIAL_DC: DC;
|
|
6
6
|
export declare const LAYER = 169;
|
|
7
|
-
export declare const APP_VERSION = "MTKruto 0.1.
|
|
7
|
+
export declare const APP_VERSION = "MTKruto 0.1.138";
|
|
8
8
|
export declare const DEVICE_MODEL: string;
|
|
9
9
|
export declare const LANG_CODE: string;
|
|
10
10
|
export declare const LANG_PACK = "";
|
package/script/4_constants.js
CHANGED
|
@@ -79,7 +79,7 @@ exports.PUBLIC_KEYS = Object.freeze([
|
|
|
79
79
|
]);
|
|
80
80
|
exports.INITIAL_DC = "2";
|
|
81
81
|
exports.LAYER = 169;
|
|
82
|
-
exports.APP_VERSION = "MTKruto 0.1.
|
|
82
|
+
exports.APP_VERSION = "MTKruto 0.1.138";
|
|
83
83
|
// @ts-ignore: lib
|
|
84
84
|
exports.DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
85
85
|
exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
|
@@ -33,12 +33,18 @@ type Msg<T> = "message" extends keyof T ? T & {
|
|
|
33
33
|
} : "callbackQuery" extends keyof T ? "message" extends keyof T["callbackQuery"] ? T & {
|
|
34
34
|
msg: T["callbackQuery"]["message"];
|
|
35
35
|
} : T : T;
|
|
36
|
-
type From<T> = "callbackQuery"
|
|
36
|
+
type From<T> = "callbackQuery" extends keyof T ? T & {
|
|
37
37
|
from: User;
|
|
38
|
-
} : "
|
|
38
|
+
} : "inlineQuery" extends keyof T ? T & {
|
|
39
|
+
from: User;
|
|
40
|
+
} : "message" extends keyof T ? T & {
|
|
41
|
+
from?: User;
|
|
42
|
+
} : "editedMessage" extends keyof T ? T & {
|
|
39
43
|
from?: User;
|
|
40
44
|
} : T;
|
|
41
|
-
type SenderChat<T> = "message"
|
|
45
|
+
type SenderChat<T> = "message" extends keyof T ? T & {
|
|
46
|
+
senderChat?: ChatP;
|
|
47
|
+
} : "editedMessage" extends keyof T ? T & {
|
|
42
48
|
senderChat?: ChatP;
|
|
43
49
|
} : T;
|
|
44
50
|
type Shortcuts<T> = SenderChat<From<Chat<Msg<T>>>>;
|
|
@@ -46,7 +46,7 @@ export interface UpdateAuthorizationState {
|
|
|
46
46
|
*
|
|
47
47
|
* ```
|
|
48
48
|
* // Handle text messages
|
|
49
|
-
* client.on(
|
|
49
|
+
* client.on("message:text", (ctx) => {
|
|
50
50
|
* const receivedOrSent = ctx.message.out ? "sent" : "received";
|
|
51
51
|
* console.log("Just", receivedOrSent, "a text message:", ctx.message.text);
|
|
52
52
|
* });
|