@mtkruto/node 0.0.834 → 0.0.900
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/client/client.d.ts +29 -4
- package/esm/client/client.js +528 -71
- package/esm/client/client_abstract.d.ts +1 -1
- package/esm/connection/connection.d.ts +1 -1
- package/esm/constants.d.ts +2 -0
- package/esm/constants.js +2 -0
- package/esm/deps/deno.land/std@0.190.0/encoding/base64.d.ts +11 -0
- package/esm/deps/deno.land/std@0.190.0/encoding/base64.js +140 -0
- package/esm/deps/deno.land/x/q@v0.0.1/mod.d.ts +6 -0
- package/esm/deps/deno.land/x/q@v0.0.1/mod.js +71 -0
- package/esm/deps.d.ts +2 -0
- package/esm/deps.js +2 -0
- package/esm/mod.d.ts +3 -3
- package/esm/mod.js +3 -3
- package/esm/storage/storage.d.ts +19 -1
- package/esm/storage/storage.js +103 -0
- package/esm/storage/storage_local_storage.d.ts +1 -1
- package/esm/storage/storage_memory.d.ts +1 -1
- package/esm/storage/storage_session_storage.d.ts +1 -1
- package/esm/tl/1_tl_object.d.ts +0 -1
- package/esm/tl/1_tl_object.js +1 -1
- package/esm/tl/4_tl_writer.d.ts +5 -0
- package/esm/tl/5_rpc_result.d.ts +9 -0
- package/esm/tl/6_message.d.ts +10 -0
- package/esm/tl/{5_message.js → 6_message.js} +2 -2
- package/esm/tl/{6_message_container.d.ts → 7_message_container.d.ts} +1 -1
- package/esm/tl/{6_message_container.js → 7_message_container.js} +2 -2
- package/esm/transport/transport.d.ts +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +17 -0
- package/esm/types/0_chat_administrator_rights.js +38 -0
- package/esm/types/0_chat_photo.d.ts +24 -0
- package/esm/types/0_chat_photo.js +28 -0
- package/esm/types/0_force_reply.d.ts +8 -0
- package/esm/types/0_force_reply.js +17 -0
- package/esm/types/0_keyboard_button_poll_type.d.ts +3 -0
- package/esm/types/0_login_url.d.ts +6 -0
- package/esm/types/0_login_url.js +1 -0
- package/esm/types/0_message_entity.d.ts +1 -1
- package/esm/types/0_message_entity.js +2 -2
- package/esm/types/0_reply_keyboard_remove.d.ts +7 -0
- package/esm/types/0_reply_keyboard_remove.js +8 -0
- package/esm/types/0_web_app_info.d.ts +4 -0
- package/esm/types/0_web_app_info.js +3 -0
- package/esm/types/1_chat.d.ts +60 -0
- package/esm/types/1_chat.js +70 -0
- package/esm/types/1_inline_keyboard_button.d.ts +33 -0
- package/esm/types/1_inline_keyboard_button.js +63 -0
- package/esm/types/1_keyboard_button.d.ts +43 -0
- package/esm/types/1_keyboard_button.js +133 -0
- package/esm/types/1_user.d.ts +19 -0
- package/esm/types/1_user.js +25 -0
- package/esm/types/2_inline_keyboard_markup.d.ts +7 -0
- package/esm/types/2_inline_keyboard_markup.js +25 -0
- package/esm/types/2_reply_keyboard_markup.d.ts +12 -0
- package/esm/types/2_reply_keyboard_markup.js +37 -0
- package/esm/types/3_message.d.ts +26 -0
- package/esm/types/3_message.js +91 -0
- package/esm/utilities/0_control.d.ts +1 -0
- package/esm/utilities/0_control.js +3 -0
- package/esm/utilities/0_object.d.ts +1 -0
- package/esm/utilities/0_object.js +14 -0
- package/esm/utilities/0_types.js +1 -0
- package/esm/utilities/1_message.d.ts +2 -2
- package/esm/utilities/1_message.js +3 -3
- package/esm/utilities/1_password.js +1 -1
- package/package.json +1 -1
- package/script/client/client.d.ts +29 -4
- package/script/client/client.js +528 -71
- package/script/client/client_abstract.d.ts +1 -1
- package/script/connection/connection.d.ts +1 -1
- package/script/constants.d.ts +2 -0
- package/script/constants.js +3 -1
- package/script/deps/deno.land/std@0.190.0/encoding/base64.d.ts +11 -0
- package/script/deps/deno.land/std@0.190.0/encoding/base64.js +145 -0
- package/script/deps/deno.land/x/q@v0.0.1/mod.d.ts +6 -0
- package/script/deps/deno.land/x/q@v0.0.1/mod.js +75 -0
- package/script/deps.d.ts +2 -0
- package/script/deps.js +6 -1
- package/script/mod.d.ts +3 -3
- package/script/mod.js +3 -3
- package/script/storage/storage.d.ts +19 -1
- package/script/storage/storage.js +126 -0
- package/script/storage/storage_local_storage.d.ts +1 -1
- package/script/storage/storage_memory.d.ts +1 -1
- package/script/storage/storage_session_storage.d.ts +1 -1
- package/script/tl/1_tl_object.d.ts +0 -1
- package/script/tl/1_tl_object.js +1 -1
- package/script/tl/4_tl_writer.d.ts +5 -0
- package/script/tl/5_rpc_result.d.ts +9 -0
- package/script/tl/6_message.d.ts +10 -0
- package/script/tl/{5_message.js → 6_message.js} +6 -6
- package/script/tl/{6_message_container.d.ts → 7_message_container.d.ts} +1 -1
- package/script/tl/{6_message_container.js → 7_message_container.js} +4 -4
- package/script/transport/transport.d.ts +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +17 -0
- package/script/types/0_chat_administrator_rights.js +66 -0
- package/script/types/0_chat_photo.d.ts +24 -0
- package/script/types/0_chat_photo.js +55 -0
- package/script/types/0_force_reply.d.ts +8 -0
- package/script/types/0_force_reply.js +45 -0
- package/script/types/0_keyboard_button_poll_type.d.ts +3 -0
- package/script/types/0_login_url.d.ts +6 -0
- package/script/types/0_login_url.js +2 -0
- package/script/types/0_message_entity.d.ts +1 -1
- package/script/types/0_message_entity.js +2 -2
- package/script/types/0_reply_keyboard_remove.d.ts +7 -0
- package/script/types/0_reply_keyboard_remove.js +36 -0
- package/script/types/0_web_app_info.d.ts +4 -0
- package/script/types/0_web_app_info.js +7 -0
- package/script/types/1_chat.d.ts +60 -0
- package/script/types/1_chat.js +97 -0
- package/script/types/1_inline_keyboard_button.d.ts +33 -0
- package/script/types/1_inline_keyboard_button.js +91 -0
- package/script/types/1_keyboard_button.d.ts +43 -0
- package/script/types/1_keyboard_button.js +161 -0
- package/script/types/1_user.d.ts +19 -0
- package/script/types/1_user.js +52 -0
- package/script/types/2_inline_keyboard_markup.d.ts +7 -0
- package/script/types/2_inline_keyboard_markup.js +53 -0
- package/script/types/2_reply_keyboard_markup.d.ts +12 -0
- package/script/types/2_reply_keyboard_markup.js +65 -0
- package/script/types/3_message.d.ts +26 -0
- package/script/types/3_message.js +118 -0
- package/script/utilities/0_control.d.ts +1 -0
- package/script/utilities/0_control.js +7 -0
- package/script/utilities/0_object.d.ts +1 -0
- package/script/utilities/0_object.js +18 -0
- package/script/utilities/0_types.js +2 -0
- package/script/utilities/1_message.d.ts +2 -2
- package/script/utilities/1_message.js +9 -9
- package/script/utilities/1_password.js +1 -1
- package/esm/tl/3_tl_writer.d.ts +0 -5
- package/esm/tl/4_rpc_result.d.ts +0 -8
- package/esm/tl/5_message.d.ts +0 -11
- package/script/tl/3_tl_writer.d.ts +0 -5
- package/script/tl/4_rpc_result.d.ts +0 -8
- package/script/tl/5_message.d.ts +0 -11
- /package/esm/tl/{3_tl_writer.js → 4_tl_writer.js} +0 -0
- /package/esm/tl/{4_rpc_result.js → 5_rpc_result.js} +0 -0
- /package/esm/{types.js → types/0_keyboard_button_poll_type.js} +0 -0
- /package/esm/{types.d.ts → utilities/0_types.d.ts} +0 -0
- /package/script/tl/{3_tl_writer.js → 4_tl_writer.js} +0 -0
- /package/script/tl/{4_rpc_result.js → 5_rpc_result.js} +0 -0
- /package/script/{types.js → types/0_keyboard_button_poll_type.js} +0 -0
- /package/script/{types.d.ts → utilities/0_types.d.ts} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as types from "../tl/2_types.js";
|
|
2
|
+
export interface ChatAdministratorRights {
|
|
3
|
+
isAnonymous: boolean;
|
|
4
|
+
canManageChat: boolean;
|
|
5
|
+
canDeleteMessages: boolean;
|
|
6
|
+
canManageVideoChats: boolean;
|
|
7
|
+
canRestrictMembers: boolean;
|
|
8
|
+
canPromoteMembers: boolean;
|
|
9
|
+
canChangeInfo: boolean;
|
|
10
|
+
canInviteUsers: boolean;
|
|
11
|
+
canPostMessages?: boolean;
|
|
12
|
+
canEditMessages?: boolean;
|
|
13
|
+
canPinMessages?: boolean;
|
|
14
|
+
canManageTopics?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function constructChatAdministratorRights(rights_: types.ChatAdminRights): ChatAdministratorRights;
|
|
17
|
+
export declare function chatAdministratorRightsToTlObject(rights: ChatAdministratorRights): types.ChatAdminRights;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.chatAdministratorRightsToTlObject = exports.constructChatAdministratorRights = void 0;
|
|
27
|
+
const types = __importStar(require("../tl/2_types.js"));
|
|
28
|
+
function constructChatAdministratorRights(rights_) {
|
|
29
|
+
const rights = {
|
|
30
|
+
isAnonymous: rights_.anonymous || false,
|
|
31
|
+
canManageChat: rights_.other || false,
|
|
32
|
+
canDeleteMessages: rights_.deleteMessages || false,
|
|
33
|
+
canManageVideoChats: rights_.manageCall || false,
|
|
34
|
+
canRestrictMembers: rights_.banUsers || false,
|
|
35
|
+
canPromoteMembers: rights_.addAdmins || false,
|
|
36
|
+
canChangeInfo: rights_.changeInfo || false,
|
|
37
|
+
canInviteUsers: rights_.inviteUsers || false,
|
|
38
|
+
};
|
|
39
|
+
if (rights_.postMessages) {
|
|
40
|
+
rights.canPostMessages = rights_.postMessages;
|
|
41
|
+
}
|
|
42
|
+
if (rights_.editMessages) {
|
|
43
|
+
rights.canEditMessages = rights_.editMessages;
|
|
44
|
+
}
|
|
45
|
+
if (rights_.pinMessages) {
|
|
46
|
+
rights.canPinMessages = rights_.pinMessages;
|
|
47
|
+
}
|
|
48
|
+
if (rights_.manageTopics) {
|
|
49
|
+
rights.canManageTopics = rights_.manageTopics;
|
|
50
|
+
}
|
|
51
|
+
return rights;
|
|
52
|
+
}
|
|
53
|
+
exports.constructChatAdministratorRights = constructChatAdministratorRights;
|
|
54
|
+
function chatAdministratorRightsToTlObject(rights) {
|
|
55
|
+
return new types.ChatAdminRights({
|
|
56
|
+
anonymous: rights.isAnonymous || undefined,
|
|
57
|
+
other: rights.canManageChat || undefined,
|
|
58
|
+
deleteMessages: rights.canDeleteMessages || undefined,
|
|
59
|
+
manageCall: rights.canManageChat || undefined,
|
|
60
|
+
banUsers: rights.canRestrictMembers || undefined,
|
|
61
|
+
addAdmins: rights.canPromoteMembers || undefined,
|
|
62
|
+
changeInfo: rights.canChangeInfo || undefined,
|
|
63
|
+
inviteUsers: rights.canInviteUsers || undefined,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.chatAdministratorRightsToTlObject = chatAdministratorRightsToTlObject;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as types from "../tl/2_types.js";
|
|
2
|
+
export declare enum ChatPhotoType {
|
|
3
|
+
Chat = "chat",
|
|
4
|
+
User = "user"
|
|
5
|
+
}
|
|
6
|
+
export declare namespace ChatPhoto {
|
|
7
|
+
interface Base {
|
|
8
|
+
type: ChatPhotoType;
|
|
9
|
+
hasVideo: boolean;
|
|
10
|
+
photoId: bigint;
|
|
11
|
+
strippedThumb?: Uint8Array;
|
|
12
|
+
dcId: number;
|
|
13
|
+
}
|
|
14
|
+
interface User extends Base {
|
|
15
|
+
type: ChatPhotoType;
|
|
16
|
+
personal: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface Chat extends Base {
|
|
19
|
+
type: ChatPhotoType;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export type ChatPhoto = ChatPhoto.User | ChatPhoto.Chat;
|
|
23
|
+
export declare function constructChatPhoto(photo: types.ChatPhoto): ChatPhoto.Chat;
|
|
24
|
+
export declare function constructChatPhoto(photo: types.UserProfilePhoto): ChatPhoto.User;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.constructChatPhoto = exports.ChatPhotoType = void 0;
|
|
27
|
+
const types = __importStar(require("../tl/2_types.js"));
|
|
28
|
+
var ChatPhotoType;
|
|
29
|
+
(function (ChatPhotoType) {
|
|
30
|
+
ChatPhotoType["Chat"] = "chat";
|
|
31
|
+
ChatPhotoType["User"] = "user";
|
|
32
|
+
})(ChatPhotoType = exports.ChatPhotoType || (exports.ChatPhotoType = {}));
|
|
33
|
+
function constructChatPhoto(photo) {
|
|
34
|
+
const { hasVideo = false, photoId, strippedThumb, dcId } = photo;
|
|
35
|
+
if (photo instanceof types.ChatPhoto) {
|
|
36
|
+
return {
|
|
37
|
+
type: ChatPhotoType.Chat,
|
|
38
|
+
hasVideo,
|
|
39
|
+
photoId,
|
|
40
|
+
strippedThumb,
|
|
41
|
+
dcId,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return {
|
|
46
|
+
type: ChatPhotoType.User,
|
|
47
|
+
personal: photo.personal || false,
|
|
48
|
+
hasVideo,
|
|
49
|
+
photoId,
|
|
50
|
+
strippedThumb,
|
|
51
|
+
dcId,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.constructChatPhoto = constructChatPhoto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as types from "../tl/2_types.js";
|
|
2
|
+
export interface ForceReply {
|
|
3
|
+
forceReply: true;
|
|
4
|
+
inputFieldPlaceholder?: string;
|
|
5
|
+
selective?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function constructForceReply(replyMarkup_: types.ReplyKeyboardForceReply): ForceReply;
|
|
8
|
+
export declare function forceReplyToTlObject(replyMarkup: ForceReply): types.ReplyKeyboardForceReply;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.forceReplyToTlObject = exports.constructForceReply = void 0;
|
|
27
|
+
const types = __importStar(require("../tl/2_types.js"));
|
|
28
|
+
function constructForceReply(replyMarkup_) {
|
|
29
|
+
const replyMarkup = { forceReply: true };
|
|
30
|
+
if (replyMarkup_.placeholder) {
|
|
31
|
+
replyMarkup.inputFieldPlaceholder = replyMarkup_.placeholder;
|
|
32
|
+
}
|
|
33
|
+
if (replyMarkup_.selective) {
|
|
34
|
+
replyMarkup.selective = true;
|
|
35
|
+
}
|
|
36
|
+
return replyMarkup;
|
|
37
|
+
}
|
|
38
|
+
exports.constructForceReply = constructForceReply;
|
|
39
|
+
function forceReplyToTlObject(replyMarkup) {
|
|
40
|
+
return new types.ReplyKeyboardForceReply({
|
|
41
|
+
selective: replyMarkup.selective || undefined,
|
|
42
|
+
placeholder: replyMarkup.inputFieldPlaceholder,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
exports.forceReplyToTlObject = forceReplyToTlObject;
|
|
@@ -84,7 +84,7 @@ export declare namespace MessageEntity {
|
|
|
84
84
|
}
|
|
85
85
|
interface CustomEmoji extends Base {
|
|
86
86
|
type: MessageEntityType.CustomEmoji;
|
|
87
|
-
|
|
87
|
+
customEmojiId: string;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
export type MessageEntity = MessageEntity.Mention | MessageEntity.Hashtag | MessageEntity.BotCommand | MessageEntity.URL | MessageEntity.EmailAddress | MessageEntity.Bold | MessageEntity.Italic | MessageEntity.Code | MessageEntity.Pre | MessageEntity.TextURL | MessageEntity.MentionName | MessageEntity.Cashtag | MessageEntity.Phone | MessageEntity.Underline | MessageEntity.Strike | MessageEntity.Blockquote | MessageEntity.BankCard | MessageEntity.Spoiler | MessageEntity.CustomEmoji;
|
|
@@ -103,7 +103,7 @@ function constructMessageEntity(obj) {
|
|
|
103
103
|
return { type: MessageEntityType.Spoiler, offset: obj.offset, length: obj.length };
|
|
104
104
|
}
|
|
105
105
|
else if (obj instanceof types.MessageEntityCustomEmoji) {
|
|
106
|
-
return { type: MessageEntityType.CustomEmoji, offset: obj.offset, length: obj.length,
|
|
106
|
+
return { type: MessageEntityType.CustomEmoji, offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
|
|
107
107
|
}
|
|
108
108
|
else {
|
|
109
109
|
return null;
|
|
@@ -150,7 +150,7 @@ function messageEntityToTlObject(entity) {
|
|
|
150
150
|
case MessageEntityType.Spoiler:
|
|
151
151
|
return new types.MessageEntitySpoiler({ offset, length });
|
|
152
152
|
case MessageEntityType.CustomEmoji:
|
|
153
|
-
return new types.MessageEntityCustomEmoji({ offset, length, documentId: entity.
|
|
153
|
+
return new types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
exports.messageEntityToTlObject = messageEntityToTlObject;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as types from "../tl/2_types.js";
|
|
2
|
+
export interface ReplyKeyboardRemove {
|
|
3
|
+
removeKeyboard: true;
|
|
4
|
+
selective?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function constructReplyKeyboardRemove(replyMarkup_: types.ReplyKeyboardHide): ReplyKeyboardRemove;
|
|
7
|
+
export declare function replyKeyboardRemoveToTlObject(replyMarkup: ReplyKeyboardRemove): types.ReplyKeyboardHide;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.replyKeyboardRemoveToTlObject = exports.constructReplyKeyboardRemove = void 0;
|
|
27
|
+
const _0_object_js_1 = require("../utilities/0_object.js");
|
|
28
|
+
const types = __importStar(require("../tl/2_types.js"));
|
|
29
|
+
function constructReplyKeyboardRemove(replyMarkup_) {
|
|
30
|
+
return (0, _0_object_js_1.cleanObject)({ removeKeyboard: true, selective: replyMarkup_.selective });
|
|
31
|
+
}
|
|
32
|
+
exports.constructReplyKeyboardRemove = constructReplyKeyboardRemove;
|
|
33
|
+
function replyKeyboardRemoveToTlObject(replyMarkup) {
|
|
34
|
+
return new types.ReplyKeyboardHide({ selective: replyMarkup.selective || undefined });
|
|
35
|
+
}
|
|
36
|
+
exports.replyKeyboardRemoveToTlObject = replyKeyboardRemoveToTlObject;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as types from "../tl/2_types.js";
|
|
2
|
+
import { ChatPhoto } from "./0_chat_photo.js";
|
|
3
|
+
export declare enum ChatType {
|
|
4
|
+
Private = "private",
|
|
5
|
+
Group = "group",
|
|
6
|
+
Supergroup = "supergroup",
|
|
7
|
+
Channel = "channel"
|
|
8
|
+
}
|
|
9
|
+
export declare namespace Chat {
|
|
10
|
+
interface Base {
|
|
11
|
+
type: ChatType;
|
|
12
|
+
id: number;
|
|
13
|
+
photo?: ChatPhoto;
|
|
14
|
+
}
|
|
15
|
+
interface Private extends Base {
|
|
16
|
+
type: ChatType.Private;
|
|
17
|
+
isBot?: boolean;
|
|
18
|
+
firstName: string;
|
|
19
|
+
lastName?: string;
|
|
20
|
+
username?: string;
|
|
21
|
+
also?: string[];
|
|
22
|
+
photo?: ChatPhoto.User;
|
|
23
|
+
isScam: boolean;
|
|
24
|
+
isFake: boolean;
|
|
25
|
+
isSupport: boolean;
|
|
26
|
+
isVerified: boolean;
|
|
27
|
+
isRestricted?: boolean;
|
|
28
|
+
restrictionReason?: types.RestrictionReason[];
|
|
29
|
+
}
|
|
30
|
+
interface Group extends Base {
|
|
31
|
+
type: ChatType.Group;
|
|
32
|
+
title: string;
|
|
33
|
+
photo?: ChatPhoto.Chat;
|
|
34
|
+
isCreator: boolean;
|
|
35
|
+
}
|
|
36
|
+
interface ChannelBase extends Base {
|
|
37
|
+
title: string;
|
|
38
|
+
username?: string;
|
|
39
|
+
also?: string[];
|
|
40
|
+
photo?: ChatPhoto.Chat;
|
|
41
|
+
isScam: boolean;
|
|
42
|
+
isFake: boolean;
|
|
43
|
+
isVerified: boolean;
|
|
44
|
+
isRestricted: boolean;
|
|
45
|
+
restrictionReason?: types.RestrictionReason[];
|
|
46
|
+
}
|
|
47
|
+
interface Channel extends ChannelBase {
|
|
48
|
+
type: ChatType.Channel;
|
|
49
|
+
title: string;
|
|
50
|
+
username?: string;
|
|
51
|
+
also?: string[];
|
|
52
|
+
}
|
|
53
|
+
interface Supergroup extends ChannelBase {
|
|
54
|
+
type: ChatType.Supergroup;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export type Chat = Chat.Private | Chat.Group | Chat.Supergroup | Chat.Channel;
|
|
58
|
+
export declare function constructChat(chat: types.User): Chat.Private;
|
|
59
|
+
export declare function constructChat(chat: types.Chat): Chat.Group;
|
|
60
|
+
export declare function constructChat(chat: types.Channel): Chat.Supergroup | Chat.Channel;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.constructChat = exports.ChatType = void 0;
|
|
27
|
+
const constants_js_1 = require("../constants.js");
|
|
28
|
+
const _0_control_js_1 = require("../utilities/0_control.js");
|
|
29
|
+
const _0_object_js_1 = require("../utilities/0_object.js");
|
|
30
|
+
const _1_tl_object_js_1 = require("../tl/1_tl_object.js");
|
|
31
|
+
const types = __importStar(require("../tl/2_types.js"));
|
|
32
|
+
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
33
|
+
var ChatType;
|
|
34
|
+
(function (ChatType) {
|
|
35
|
+
ChatType["Private"] = "private";
|
|
36
|
+
ChatType["Group"] = "group";
|
|
37
|
+
ChatType["Supergroup"] = "supergroup";
|
|
38
|
+
ChatType["Channel"] = "channel";
|
|
39
|
+
})(ChatType = exports.ChatType || (exports.ChatType = {}));
|
|
40
|
+
function constructChat(chat) {
|
|
41
|
+
if (chat instanceof types.User) {
|
|
42
|
+
const chat_ = {
|
|
43
|
+
type: ChatType.Private,
|
|
44
|
+
isBot: chat.bot || false,
|
|
45
|
+
id: Number(chat.id),
|
|
46
|
+
firstName: chat.firstName || "",
|
|
47
|
+
lastName: chat.lastName,
|
|
48
|
+
isScam: chat.scam || false,
|
|
49
|
+
isFake: chat.fake || false,
|
|
50
|
+
isSupport: chat.support || false,
|
|
51
|
+
isVerified: chat.verified || false,
|
|
52
|
+
};
|
|
53
|
+
if (chat_.isBot) {
|
|
54
|
+
chat_.isRestricted = chat.restricted || false;
|
|
55
|
+
chat_.restrictionReason = chat.restrictionReason?.map((v) => v[_1_tl_object_js_1.as](types.RestrictionReason));
|
|
56
|
+
}
|
|
57
|
+
if (chat.photo instanceof types.UserProfilePhoto) {
|
|
58
|
+
chat_.photo = (0, _0_chat_photo_js_1.constructChatPhoto)(chat.photo);
|
|
59
|
+
}
|
|
60
|
+
return (0, _0_object_js_1.cleanObject)(chat_);
|
|
61
|
+
}
|
|
62
|
+
else if (chat instanceof types.Chat) {
|
|
63
|
+
const chat_ = {
|
|
64
|
+
type: ChatType.Group,
|
|
65
|
+
id: Number(-chat.id),
|
|
66
|
+
title: chat.title,
|
|
67
|
+
isCreator: chat.creator || false,
|
|
68
|
+
};
|
|
69
|
+
if (chat.photo instanceof types.ChatPhoto) {
|
|
70
|
+
chat_.photo = (0, _0_chat_photo_js_1.constructChatPhoto)(chat.photo);
|
|
71
|
+
}
|
|
72
|
+
return (0, _0_object_js_1.cleanObject)(chat_);
|
|
73
|
+
}
|
|
74
|
+
else if (chat instanceof types.Channel) {
|
|
75
|
+
let chat_;
|
|
76
|
+
const { title, scam: isScam = false, fake: isFake = false, verified: isVerified = false, restricted: isRestricted = false, } = chat;
|
|
77
|
+
if (chat.megagroup) {
|
|
78
|
+
chat_ = { id: constants_js_1.ZERO_CHANNEL_ID + -Number(chat.id), type: ChatType.Supergroup, title, isScam, isFake, isVerified, isRestricted };
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
chat_ = { id: constants_js_1.ZERO_CHANNEL_ID + -Number(chat.id), type: ChatType.Channel, title, isScam, isFake, isVerified, isRestricted };
|
|
82
|
+
}
|
|
83
|
+
chat_.username = chat.username;
|
|
84
|
+
chat_.also = chat.usernames?.map((v) => v[_1_tl_object_js_1.as](types.Username)).map((v) => v.username);
|
|
85
|
+
if (chat_.isRestricted) {
|
|
86
|
+
chat_.restrictionReason = chat.restrictionReason?.map((v) => v[_1_tl_object_js_1.as](types.RestrictionReason));
|
|
87
|
+
}
|
|
88
|
+
if (chat.photo instanceof types.ChatPhoto) {
|
|
89
|
+
chat_.photo = (0, _0_chat_photo_js_1.constructChatPhoto)(chat.photo);
|
|
90
|
+
}
|
|
91
|
+
return (0, _0_object_js_1.cleanObject)(chat_);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
(0, _0_control_js_1.UNREACHABLE)();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.constructChat = constructChat;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MaybePromise } from "../utilities/0_types.js";
|
|
2
|
+
import * as types from "../tl/2_types.js";
|
|
3
|
+
import { WebAppInfo } from "./0_web_app_info.js";
|
|
4
|
+
import { LoginUrl } from "./0_login_url.js";
|
|
5
|
+
export declare namespace InlineKeyboardButton {
|
|
6
|
+
interface Base {
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
interface URL extends Base {
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
interface Callback extends Base {
|
|
13
|
+
callbackData: string;
|
|
14
|
+
}
|
|
15
|
+
interface WebApp extends Base {
|
|
16
|
+
webApp: WebAppInfo;
|
|
17
|
+
}
|
|
18
|
+
interface Login extends Base {
|
|
19
|
+
loginUrl: LoginUrl;
|
|
20
|
+
}
|
|
21
|
+
interface SwitchInline extends Base {
|
|
22
|
+
switchInlineQuery: string;
|
|
23
|
+
}
|
|
24
|
+
interface SwitchInlineCurrent extends Base {
|
|
25
|
+
switchInlineQueryCurrentChat: string;
|
|
26
|
+
}
|
|
27
|
+
interface Pay extends Base {
|
|
28
|
+
pay: boolean;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export type InlineKeyboardButton = InlineKeyboardButton.URL | InlineKeyboardButton.Callback | InlineKeyboardButton.WebApp | InlineKeyboardButton.Login | InlineKeyboardButton.SwitchInline | InlineKeyboardButton.SwitchInlineCurrent | InlineKeyboardButton.Pay;
|
|
32
|
+
export declare function constructInlineKeyboardButton(button_: types.TypeKeyboardButton): InlineKeyboardButton;
|
|
33
|
+
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: (username: string) => MaybePromise<types.InputUser>): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.inlineKeyboardButtonToTlObject = exports.constructInlineKeyboardButton = void 0;
|
|
27
|
+
const _0_control_js_1 = require("../utilities/0_control.js");
|
|
28
|
+
const types = __importStar(require("../tl/2_types.js"));
|
|
29
|
+
const _0_web_app_info_js_1 = require("./0_web_app_info.js");
|
|
30
|
+
function constructInlineKeyboardButton(button_) {
|
|
31
|
+
if (button_ instanceof types.KeyboardButtonURL) {
|
|
32
|
+
return { text: button_.text, url: button_.url };
|
|
33
|
+
}
|
|
34
|
+
else if (button_ instanceof types.KeyboardButtonCallback) {
|
|
35
|
+
return { text: button_.text, callbackData: new TextDecoder().decode(button_.data) };
|
|
36
|
+
}
|
|
37
|
+
else if (button_ instanceof types.KeyboardButtonWebView || button_ instanceof types.KeyboardButtonSimpleWebView) {
|
|
38
|
+
return { text: button_.text, webApp: (0, _0_web_app_info_js_1.constructWebAppInfo)(button_.url) };
|
|
39
|
+
}
|
|
40
|
+
else if (button_ instanceof types.KeyboardButtonURLAuth) {
|
|
41
|
+
return { text: button_.text, loginUrl: { url: button_.url, forwardText: button_.fwdText } };
|
|
42
|
+
}
|
|
43
|
+
else if (button_ instanceof types.KeyboardButtonSwitchInline) {
|
|
44
|
+
if (button_.samePeer) {
|
|
45
|
+
return { text: button_.text, switchInlineQueryCurrentChat: button_.query };
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return { text: button_.text, switchInlineQuery: button_.query };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else if (button_ instanceof types.KeyboardButtonBuy) {
|
|
52
|
+
return { text: button_.text, pay: true };
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
(0, _0_control_js_1.UNREACHABLE)();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.constructInlineKeyboardButton = constructInlineKeyboardButton;
|
|
59
|
+
async function inlineKeyboardButtonToTlObject(button, usernameResolver) {
|
|
60
|
+
if ("url" in button) {
|
|
61
|
+
return new types.KeyboardButtonURL({ text: button.text, url: button.url });
|
|
62
|
+
}
|
|
63
|
+
else if ("callbackData" in button) {
|
|
64
|
+
return new types.KeyboardButtonCallback({ text: button.text, data: new TextEncoder().encode(button.callbackData) });
|
|
65
|
+
}
|
|
66
|
+
else if ("webApp" in button) {
|
|
67
|
+
return new types.KeyboardButtonWebView({ text: button.text, url: button.webApp.url });
|
|
68
|
+
}
|
|
69
|
+
else if ("loginUrl" in button) {
|
|
70
|
+
return new types.InputKeyboardButtonURLAuth({
|
|
71
|
+
text: button.text,
|
|
72
|
+
url: button.loginUrl.url,
|
|
73
|
+
fwdText: button.loginUrl.forwardText,
|
|
74
|
+
bot: button.loginUrl.botUsername ? await usernameResolver(button.loginUrl.botUsername) : new types.InputUserSelf(),
|
|
75
|
+
requestWriteAccess: button.loginUrl.requestWriteAccess || undefined,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else if ("switchInlineQuery" in button) {
|
|
79
|
+
return new types.KeyboardButtonSwitchInline({ text: button.text, query: button.switchInlineQuery });
|
|
80
|
+
}
|
|
81
|
+
else if ("switchInlineQueryCurrentChat" in button) {
|
|
82
|
+
return new types.KeyboardButtonSwitchInline({ text: button.text, query: button.switchInlineQueryCurrentChat, samePeer: true });
|
|
83
|
+
}
|
|
84
|
+
else if ("pay" in button) {
|
|
85
|
+
return new types.KeyboardButtonBuy({ text: button.text });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
(0, _0_control_js_1.UNREACHABLE)();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.inlineKeyboardButtonToTlObject = inlineKeyboardButtonToTlObject;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as types from "../tl/2_types.js";
|
|
2
|
+
import { ChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
3
|
+
import { KeyboardButtonPollType } from "./0_keyboard_button_poll_type.js";
|
|
4
|
+
import { WebAppInfo } from "./0_web_app_info.js";
|
|
5
|
+
export declare namespace KeyboardButton {
|
|
6
|
+
interface Text {
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
interface RequestUser extends Text {
|
|
10
|
+
requestUser: {
|
|
11
|
+
requestId: number;
|
|
12
|
+
userIsBot?: boolean;
|
|
13
|
+
userIsPremium?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface RequestChat extends Text {
|
|
17
|
+
requestChat: {
|
|
18
|
+
requestId: number;
|
|
19
|
+
chatIsChannel: boolean;
|
|
20
|
+
chatIsForum?: boolean;
|
|
21
|
+
chatHasUsername?: boolean;
|
|
22
|
+
chatIsCreated?: boolean;
|
|
23
|
+
userAdministratorRights?: ChatAdministratorRights;
|
|
24
|
+
botAdministratorRights?: ChatAdministratorRights;
|
|
25
|
+
botIsMember?: boolean;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
interface RequestContact extends Text {
|
|
29
|
+
requestContact: true;
|
|
30
|
+
}
|
|
31
|
+
interface RequestLocation extends Text {
|
|
32
|
+
requestLocation: true;
|
|
33
|
+
}
|
|
34
|
+
interface RequestPoll extends Text {
|
|
35
|
+
requestPoll: KeyboardButtonPollType;
|
|
36
|
+
}
|
|
37
|
+
interface WebApp extends Text {
|
|
38
|
+
webApp: WebAppInfo;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export type KeyboardButton = KeyboardButton.Text | KeyboardButton.RequestUser | KeyboardButton.RequestChat | KeyboardButton.RequestContact | KeyboardButton.RequestLocation | KeyboardButton.RequestPoll | KeyboardButton.WebApp;
|
|
42
|
+
export declare function constructKeyboardButton(button_: types.TypeKeyboardButton): KeyboardButton;
|
|
43
|
+
export declare function keyboardButtonToTlObject(button: KeyboardButton): types.KeyboardButtonRequestPhone | types.KeyboardButtonRequestGeoLocation | types.KeyboardButtonRequestPoll | types.KeyboardButtonWebView | types.KeyboardButtonRequestPeer;
|