1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.login = exports.pay = exports.game = exports.switchToCurrentChat = exports.switchToChat = exports.callback = exports.url = exports.pollRequest = exports.locationRequest = exports.contactRequest = exports.text = void 0;
|
4 | function text(text, hide = false) {
|
5 | return { text, hide };
|
6 | }
|
7 | exports.text = text;
|
8 | function contactRequest(text, hide = false) {
|
9 | return { text, request_contact: true, hide };
|
10 | }
|
11 | exports.contactRequest = contactRequest;
|
12 | function locationRequest(text, hide = false) {
|
13 | return { text, request_location: true, hide };
|
14 | }
|
15 | exports.locationRequest = locationRequest;
|
16 | function pollRequest(text, type, hide = false) {
|
17 | return { text, request_poll: { type }, hide };
|
18 | }
|
19 | exports.pollRequest = pollRequest;
|
20 | function url(text, url, hide = false) {
|
21 | return { text, url, hide };
|
22 | }
|
23 | exports.url = url;
|
24 | function callback(text, data, hide = false) {
|
25 | return { text, callback_data: data, hide };
|
26 | }
|
27 | exports.callback = callback;
|
28 | function switchToChat(text, value, hide = false) {
|
29 | return { text, switch_inline_query: value, hide };
|
30 | }
|
31 | exports.switchToChat = switchToChat;
|
32 | function switchToCurrentChat(text, value, hide = false) {
|
33 | return { text, switch_inline_query_current_chat: value, hide };
|
34 | }
|
35 | exports.switchToCurrentChat = switchToCurrentChat;
|
36 | function game(text, hide = false) {
|
37 | return { text, callback_game: {}, hide };
|
38 | }
|
39 | exports.game = game;
|
40 | function pay(text, hide = false) {
|
41 | return { text, pay: true, hide };
|
42 | }
|
43 | exports.pay = pay;
|
44 | function login(text, url, opts = {}, hide = false) {
|
45 | return {
|
46 | text,
|
47 | login_url: { ...opts, url },
|
48 | hide,
|
49 | };
|
50 | }
|
51 | exports.login = login;
|