@aracna/telegram-bot 1.9.12 → 1.9.14
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/builders/button.builder.d.ts +2 -2
- package/childs/add.d.ts +3 -3
- package/childs/answer.d.ts +3 -2
- package/childs/answer.js +3 -0
- package/childs/approve.d.ts +6 -0
- package/childs/approve.js +10 -0
- package/childs/ban.d.ts +4 -3
- package/childs/ban.js +5 -2
- package/childs/close.d.ts +7 -0
- package/childs/close.js +13 -0
- package/childs/copy.d.ts +7 -0
- package/childs/copy.js +13 -0
- package/childs/create.d.ts +7 -3
- package/childs/create.js +13 -4
- package/childs/decline.d.ts +6 -0
- package/childs/decline.js +10 -0
- package/childs/delete.d.ts +10 -5
- package/childs/delete.js +20 -8
- package/childs/download.d.ts +2 -3
- package/childs/edit.d.ts +9 -5
- package/childs/edit.js +19 -3
- package/childs/export.d.ts +3 -2
- package/childs/export.js +2 -2
- package/childs/forward.d.ts +4 -3
- package/childs/forward.js +5 -7
- package/childs/get.d.ts +22 -11
- package/childs/get.js +52 -16
- package/childs/hide.d.ts +6 -0
- package/childs/hide.js +10 -0
- package/childs/leave.d.ts +3 -2
- package/childs/leave.js +2 -2
- package/childs/log.d.ts +5 -0
- package/childs/log.js +10 -0
- package/childs/pin.d.ts +3 -3
- package/childs/pin.js +2 -2
- package/childs/polling.d.ts +1 -1
- package/childs/polling.js +1 -1
- package/childs/privates/send.private.d.ts +5 -4
- package/childs/privates/send.private.js +2 -2
- package/childs/promote.d.ts +3 -3
- package/childs/promote.js +2 -2
- package/childs/refund.d.ts +6 -0
- package/childs/refund.js +14 -0
- package/childs/reopen.d.ts +7 -0
- package/childs/reopen.js +13 -0
- package/childs/replace.d.ts +6 -0
- package/childs/replace.js +10 -0
- package/childs/restrict.d.ts +3 -3
- package/childs/restrict.js +1 -3
- package/childs/revoke.d.ts +6 -0
- package/childs/revoke.js +10 -0
- package/childs/send.d.ts +26 -25
- package/childs/send.js +22 -41
- package/childs/set.d.ts +24 -13
- package/childs/set.js +60 -22
- package/childs/stop.d.ts +3 -3
- package/childs/stop.js +2 -2
- package/childs/unban.d.ts +4 -2
- package/childs/unban.js +5 -2
- package/childs/unhide.d.ts +6 -0
- package/childs/unhide.js +10 -0
- package/childs/unpin.d.ts +6 -2
- package/childs/unpin.js +15 -2
- package/childs/upload.d.ts +3 -4
- package/childs/upload.js +2 -2
- package/childs/webhook.d.ts +5 -3
- package/childs/webhook.js +8 -2
- package/definitions/interfaces.d.ts +27 -15
- package/definitions/interfaces.js +0 -1
- package/definitions/types.d.ts +2 -2
- package/index.d.ts +367 -162
- package/modules/api.d.ts +1 -1
- package/modules/configuration.d.ts +1 -1
- package/modules/dummy.d.ts +1 -1
- package/modules/telegram.d.ts +27 -5
- package/modules/telegram.js +37 -4
- package/package.json +12 -12
- package/utils/callback.query.utils.d.ts +2 -2
- package/utils/command.utils.d.ts +2 -3
- package/utils/context.utils.d.ts +5 -5
- package/utils/context.utils.js +5 -5
- package/utils/inline.keyboard.utils.d.ts +1 -1
- package/utils/reply.to.message.utils.d.ts +3 -3
- package/utils/start.utils.d.ts +4 -4
package/modules/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FetchError, RequestMethod, RestAPI, RestApiConfig } from '@aracna/core';
|
|
1
|
+
import { type FetchError, type RequestMethod, RestAPI, type RestApiConfig } from '@aracna/core';
|
|
2
2
|
export declare class API extends RestAPI {
|
|
3
3
|
post<V, W, X = undefined>(path: string, body?: W, config?: RestApiConfig<void>): Promise<V | FetchError<X>>;
|
|
4
4
|
transformBody<V>(method: RequestMethod, path: string, body: V, config: RestApiConfig<void>): Promise<FormData>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurationAPI, ConfigurationDefault, ConfigurationHandler } from '../definitions/interfaces';
|
|
1
|
+
import type { ConfigurationAPI, ConfigurationDefault, ConfigurationHandler } from '../definitions/interfaces';
|
|
2
2
|
declare class ConfigurationBuilder {
|
|
3
3
|
api: ConfigurationAPI;
|
|
4
4
|
default: ConfigurationDefault;
|
package/modules/dummy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallbackQueryBody, ConfigurationAPI, ConfigurationDefault, ConfigurationHandler, Handler, MessageBody } from '../definitions/interfaces';
|
|
1
|
+
import type { CallbackQueryBody, ConfigurationAPI, ConfigurationDefault, ConfigurationHandler, Handler, MessageBody } from '../definitions/interfaces';
|
|
2
2
|
export declare class Dummy {
|
|
3
3
|
static get callbackQueryBody(): CallbackQueryBody;
|
|
4
4
|
static get configurationAPI(): ConfigurationAPI;
|
package/modules/telegram.d.ts
CHANGED
|
@@ -1,29 +1,40 @@
|
|
|
1
|
-
import { BotCommand, CallbackQuery, ChatJoinRequest, ChatMemberUpdated, ChosenInlineResult, InlineQuery, Message, Poll, PollAnswer, PreCheckoutQuery, ShippingQuery, Update } from '@aracna/telegram-bot-types';
|
|
1
|
+
import type { BotCommand, CallbackQuery, ChatJoinRequest, ChatMemberUpdated, ChosenInlineResult, InlineQuery, Message, Poll, PollAnswer, PreCheckoutQuery, ShippingQuery, Update } from '@aracna/telegram-bot-types';
|
|
2
2
|
import { Add } from '../childs/add';
|
|
3
3
|
import { Answer } from '../childs/answer';
|
|
4
|
+
import { Approve } from '../childs/approve';
|
|
4
5
|
import { Ban } from '../childs/ban';
|
|
6
|
+
import { Close } from '../childs/close';
|
|
7
|
+
import { Copy } from '../childs/copy';
|
|
5
8
|
import { Create } from '../childs/create';
|
|
9
|
+
import { Decline } from '../childs/decline';
|
|
6
10
|
import { Delete } from '../childs/delete';
|
|
7
11
|
import { Download } from '../childs/download';
|
|
8
12
|
import { Edit } from '../childs/edit';
|
|
9
13
|
import { Export } from '../childs/export';
|
|
10
14
|
import { Forward } from '../childs/forward';
|
|
11
15
|
import { Get } from '../childs/get';
|
|
16
|
+
import { Hide } from '../childs/hide';
|
|
12
17
|
import { Leave } from '../childs/leave';
|
|
18
|
+
import { Log } from '../childs/log';
|
|
13
19
|
import { Pin } from '../childs/pin';
|
|
14
20
|
import { Polling } from '../childs/polling';
|
|
15
21
|
import { Promote } from '../childs/promote';
|
|
22
|
+
import { Refund } from '../childs/refund';
|
|
23
|
+
import { Reopen } from '../childs/reopen';
|
|
24
|
+
import { Replace } from '../childs/replace';
|
|
16
25
|
import { Restrict } from '../childs/restrict';
|
|
26
|
+
import { Revoke } from '../childs/revoke';
|
|
17
27
|
import { Send } from '../childs/send';
|
|
18
28
|
import { Set } from '../childs/set';
|
|
19
29
|
import { Stop } from '../childs/stop';
|
|
20
30
|
import { Unban } from '../childs/unban';
|
|
31
|
+
import { Unhide } from '../childs/unhide';
|
|
21
32
|
import { Unpin } from '../childs/unpin';
|
|
22
33
|
import { Upload } from '../childs/upload';
|
|
23
34
|
import { Webhook } from '../childs/webhook';
|
|
24
35
|
import { UpdateType } from '../definitions/enums';
|
|
25
|
-
import { Handler, HandlerOptions, TelegramName } from '../definitions/interfaces';
|
|
26
|
-
import { HandlerMiddleware } from '../definitions/types';
|
|
36
|
+
import type { Handler, HandlerOptions, TelegramName } from '../definitions/interfaces';
|
|
37
|
+
import type { HandlerMiddleware } from '../definitions/types';
|
|
27
38
|
import { API } from './api';
|
|
28
39
|
import { Builder } from './builder';
|
|
29
40
|
export declare class Telegram {
|
|
@@ -31,7 +42,7 @@ export declare class Telegram {
|
|
|
31
42
|
api: API;
|
|
32
43
|
handlers: Handler[];
|
|
33
44
|
hostname: string;
|
|
34
|
-
id:
|
|
45
|
+
id: bigint;
|
|
35
46
|
name: TelegramName;
|
|
36
47
|
port: number;
|
|
37
48
|
token: string;
|
|
@@ -41,23 +52,34 @@ export declare class Telegram {
|
|
|
41
52
|
/** CHILDS */
|
|
42
53
|
add: Add;
|
|
43
54
|
answer: Answer;
|
|
55
|
+
approve: Approve;
|
|
56
|
+
ban: Ban;
|
|
57
|
+
close: Close;
|
|
58
|
+
copy: Copy;
|
|
44
59
|
create: Create;
|
|
60
|
+
decline: Decline;
|
|
45
61
|
delete: Delete;
|
|
46
62
|
download: Download;
|
|
47
63
|
edit: Edit;
|
|
48
64
|
export: Export;
|
|
49
65
|
forward: Forward;
|
|
50
66
|
get: Get;
|
|
51
|
-
|
|
67
|
+
hide: Hide;
|
|
52
68
|
leave: Leave;
|
|
69
|
+
log: Log;
|
|
53
70
|
pin: Pin;
|
|
54
71
|
polling: Polling;
|
|
55
72
|
promote: Promote;
|
|
73
|
+
refund: Refund;
|
|
74
|
+
reopen: Reopen;
|
|
75
|
+
replace: Replace;
|
|
56
76
|
restrict: Restrict;
|
|
77
|
+
revoke: Revoke;
|
|
57
78
|
send: Send;
|
|
58
79
|
set: Set;
|
|
59
80
|
stop: Stop;
|
|
60
81
|
unban: Unban;
|
|
82
|
+
unhide: Unhide;
|
|
61
83
|
unpin: Unpin;
|
|
62
84
|
upload: Upload;
|
|
63
85
|
webhook: Webhook;
|
package/modules/telegram.js
CHANGED
|
@@ -4,23 +4,34 @@ exports.Telegram = void 0;
|
|
|
4
4
|
const core_1 = require("@aracna/core");
|
|
5
5
|
const add_1 = require("../childs/add");
|
|
6
6
|
const answer_1 = require("../childs/answer");
|
|
7
|
+
const approve_1 = require("../childs/approve");
|
|
7
8
|
const ban_1 = require("../childs/ban");
|
|
9
|
+
const close_1 = require("../childs/close");
|
|
10
|
+
const copy_1 = require("../childs/copy");
|
|
8
11
|
const create_1 = require("../childs/create");
|
|
12
|
+
const decline_1 = require("../childs/decline");
|
|
9
13
|
const delete_1 = require("../childs/delete");
|
|
10
14
|
const download_1 = require("../childs/download");
|
|
11
15
|
const edit_1 = require("../childs/edit");
|
|
12
16
|
const export_1 = require("../childs/export");
|
|
13
17
|
const forward_1 = require("../childs/forward");
|
|
14
18
|
const get_1 = require("../childs/get");
|
|
19
|
+
const hide_1 = require("../childs/hide");
|
|
15
20
|
const leave_1 = require("../childs/leave");
|
|
21
|
+
const log_1 = require("../childs/log");
|
|
16
22
|
const pin_1 = require("../childs/pin");
|
|
17
23
|
const polling_1 = require("../childs/polling");
|
|
18
24
|
const promote_1 = require("../childs/promote");
|
|
25
|
+
const refund_1 = require("../childs/refund");
|
|
26
|
+
const reopen_1 = require("../childs/reopen");
|
|
27
|
+
const replace_1 = require("../childs/replace");
|
|
19
28
|
const restrict_1 = require("../childs/restrict");
|
|
29
|
+
const revoke_1 = require("../childs/revoke");
|
|
20
30
|
const send_1 = require("../childs/send");
|
|
21
31
|
const set_1 = require("../childs/set");
|
|
22
32
|
const stop_1 = require("../childs/stop");
|
|
23
33
|
const unban_1 = require("../childs/unban");
|
|
34
|
+
const unhide_1 = require("../childs/unhide");
|
|
24
35
|
const unpin_1 = require("../childs/unpin");
|
|
25
36
|
const upload_1 = require("../childs/upload");
|
|
26
37
|
const webhook_1 = require("../childs/webhook");
|
|
@@ -48,23 +59,34 @@ class Telegram {
|
|
|
48
59
|
/** CHILDS */
|
|
49
60
|
add;
|
|
50
61
|
answer;
|
|
62
|
+
approve;
|
|
63
|
+
ban;
|
|
64
|
+
close;
|
|
65
|
+
copy;
|
|
51
66
|
create;
|
|
67
|
+
decline;
|
|
52
68
|
delete;
|
|
53
69
|
download;
|
|
54
70
|
edit;
|
|
55
71
|
export;
|
|
56
72
|
forward;
|
|
57
73
|
get;
|
|
58
|
-
|
|
74
|
+
hide;
|
|
59
75
|
leave;
|
|
76
|
+
log;
|
|
60
77
|
pin;
|
|
61
78
|
polling;
|
|
62
79
|
promote;
|
|
80
|
+
refund;
|
|
81
|
+
reopen;
|
|
82
|
+
replace;
|
|
63
83
|
restrict;
|
|
84
|
+
revoke;
|
|
64
85
|
send;
|
|
65
86
|
set;
|
|
66
87
|
stop;
|
|
67
88
|
unban;
|
|
89
|
+
unhide;
|
|
68
90
|
unpin;
|
|
69
91
|
upload;
|
|
70
92
|
webhook;
|
|
@@ -73,30 +95,41 @@ class Telegram {
|
|
|
73
95
|
this.handlers = [];
|
|
74
96
|
this.hostname = hostname;
|
|
75
97
|
this.name = { first: '', last: '' };
|
|
76
|
-
this.id =
|
|
98
|
+
this.id = 0n;
|
|
77
99
|
this.port = port;
|
|
78
100
|
this.token = token;
|
|
79
101
|
this.username = '';
|
|
80
102
|
this.builder = new builder_1.Builder();
|
|
81
103
|
this.add = new add_1.Add(this);
|
|
82
104
|
this.answer = new answer_1.Answer(this);
|
|
105
|
+
this.approve = new approve_1.Approve(this);
|
|
106
|
+
this.ban = new ban_1.Ban(this);
|
|
107
|
+
this.close = new close_1.Close(this);
|
|
108
|
+
this.copy = new copy_1.Copy(this);
|
|
83
109
|
this.create = new create_1.Create(this);
|
|
110
|
+
this.decline = new decline_1.Decline(this);
|
|
84
111
|
this.delete = new delete_1.Delete(this);
|
|
85
112
|
this.download = new download_1.Download(this);
|
|
86
113
|
this.edit = new edit_1.Edit(this);
|
|
87
114
|
this.export = new export_1.Export(this);
|
|
88
115
|
this.forward = new forward_1.Forward(this);
|
|
89
116
|
this.get = new get_1.Get(this);
|
|
90
|
-
this.
|
|
117
|
+
this.hide = new hide_1.Hide(this);
|
|
91
118
|
this.leave = new leave_1.Leave(this);
|
|
119
|
+
this.log = new log_1.Log(this);
|
|
92
120
|
this.pin = new pin_1.Pin(this);
|
|
93
121
|
this.polling = new polling_1.Polling(this);
|
|
94
122
|
this.promote = new promote_1.Promote(this);
|
|
123
|
+
this.refund = new refund_1.Refund(this);
|
|
124
|
+
this.reopen = new reopen_1.Reopen(this);
|
|
125
|
+
this.replace = new replace_1.Replace(this);
|
|
95
126
|
this.restrict = new restrict_1.Restrict(this);
|
|
127
|
+
this.revoke = new revoke_1.Revoke(this);
|
|
96
128
|
this.send = new send_1.Send(this);
|
|
97
129
|
this.set = new set_1.Set(this);
|
|
98
130
|
this.stop = new stop_1.Stop(this);
|
|
99
131
|
this.unban = new unban_1.Unban(this);
|
|
132
|
+
this.unhide = new unhide_1.Unhide(this);
|
|
100
133
|
this.unpin = new unpin_1.Unpin(this);
|
|
101
134
|
this.upload = new upload_1.Upload(this);
|
|
102
135
|
this.webhook = new webhook_1.Webhook(this);
|
|
@@ -339,7 +372,7 @@ class Telegram {
|
|
|
339
372
|
return handler;
|
|
340
373
|
handler.middleware(start);
|
|
341
374
|
if (handler.id.length > 0 && handler.options.deleteOnMessageStart) {
|
|
342
|
-
this.delete.message(body.chatID ? start.from?.id ??
|
|
375
|
+
this.delete.message(body.chatID ? start.from?.id ?? 0n : start.chat.id, start.message_id);
|
|
343
376
|
}
|
|
344
377
|
return handler;
|
|
345
378
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Dario Sechi",
|
|
3
3
|
"devDependencies": {
|
|
4
|
-
"@aracna/core": "^1.1.
|
|
5
|
-
"@aracna/telegram-bot-types": "^1.2.
|
|
6
|
-
"@microsoft/api-extractor": "^7.
|
|
7
|
-
"@types/node": "^
|
|
8
|
-
"@vitest/coverage-v8": "^
|
|
9
|
-
"@vitest/ui": "^
|
|
10
|
-
"dotenv": "^16.
|
|
11
|
-
"fastify": "^4.
|
|
12
|
-
"typescript": "^5.
|
|
13
|
-
"vitest": "^
|
|
4
|
+
"@aracna/core": "^1.1.82",
|
|
5
|
+
"@aracna/telegram-bot-types": "^1.2.13",
|
|
6
|
+
"@microsoft/api-extractor": "^7.47.5",
|
|
7
|
+
"@types/node": "^22.2.0",
|
|
8
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
9
|
+
"@vitest/ui": "^2.0.5",
|
|
10
|
+
"dotenv": "^16.4.5",
|
|
11
|
+
"fastify": "^4.28.1",
|
|
12
|
+
"typescript": "^5.5.4",
|
|
13
|
+
"vitest": "^2.0.5"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=16",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
29
|
"types": "index.d.ts",
|
|
30
|
-
"version": "1.9.
|
|
30
|
+
"version": "1.9.14",
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "rm -rf dist && pnpm tsc && pnpm api-extractor run --local",
|
|
33
|
-
"prepublish": "pnpm test && pnpm build &&
|
|
33
|
+
"prepublish": "pnpm test && pnpm build && cp LICENSE package.json README.md dist",
|
|
34
34
|
"test": "vitest run"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CallbackQueryBody } from '../definitions/interfaces';
|
|
1
|
+
import type { CallbackQueryBody } from '../definitions/interfaces';
|
|
2
2
|
export declare class CallbackQueryUtils {
|
|
3
3
|
static decodeBody<T>(data?: string): CallbackQueryBody<T>;
|
|
4
|
-
static encodeBody<T>(data: T, type: string, chatID?:
|
|
4
|
+
static encodeBody<T>(data: T, type: string, chatID?: bigint): string;
|
|
5
5
|
}
|
package/utils/command.utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { UpdateType } from '../definitions/enums';
|
|
1
|
+
import type { Context } from 'vm';
|
|
2
|
+
import type { UpdateType } from '../definitions/enums';
|
|
4
3
|
export declare class CommandUtils {
|
|
5
4
|
static getByContext<T extends UpdateType>(context: Context[T]): string;
|
|
6
5
|
static get(string?: string): string;
|
package/utils/context.utils.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Chat, User } from '@aracna/telegram-bot-types';
|
|
2
|
-
import { UpdateType } from '../definitions/enums';
|
|
3
|
-
import { Context } from '../definitions/interfaces';
|
|
1
|
+
import type { Chat, User } from '@aracna/telegram-bot-types';
|
|
2
|
+
import type { UpdateType } from '../definitions/enums';
|
|
3
|
+
import type { Context } from '../definitions/interfaces';
|
|
4
4
|
export declare class ContextUtils {
|
|
5
|
-
static getChatID<T extends UpdateType>(context: Context[T]):
|
|
5
|
+
static getChatID<T extends UpdateType>(context: Context[T]): bigint;
|
|
6
6
|
static getChatType<T extends UpdateType>(context: Context[T]): string;
|
|
7
7
|
static getChat<T extends UpdateType>(context: Context[T]): Chat;
|
|
8
|
-
static getUserID<T extends UpdateType>(context: Context[T]):
|
|
8
|
+
static getUserID<T extends UpdateType>(context: Context[T]): bigint;
|
|
9
9
|
static getUserFirstName<T extends UpdateType>(context: Context[T]): string;
|
|
10
10
|
static getUserLastName<T extends UpdateType>(context: Context[T]): string;
|
|
11
11
|
static getUserUsername<T extends UpdateType>(context: Context[T]): string;
|
package/utils/context.utils.js
CHANGED
|
@@ -12,11 +12,11 @@ class ContextUtils {
|
|
|
12
12
|
static getChat(context) {
|
|
13
13
|
switch (true) {
|
|
14
14
|
case (0, core_1.hasObjectProperty)(context, 'chat'):
|
|
15
|
-
return (0, core_1.getObjectProperty)(context, 'chat', { id:
|
|
15
|
+
return (0, core_1.getObjectProperty)(context, 'chat', { id: 0n, type: '' });
|
|
16
16
|
case (0, core_1.hasObjectProperty)(context, 'message.chat'):
|
|
17
|
-
return (0, core_1.getObjectProperty)(context, 'chat', { id:
|
|
17
|
+
return (0, core_1.getObjectProperty)(context, 'chat', { id: 0n, type: '' });
|
|
18
18
|
default:
|
|
19
|
-
return { id:
|
|
19
|
+
return { id: 0n, type: '' };
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
static getUserID(context) {
|
|
@@ -33,9 +33,9 @@ class ContextUtils {
|
|
|
33
33
|
}
|
|
34
34
|
static getUser(context) {
|
|
35
35
|
if ((0, core_1.hasObjectProperty)(context, 'from')) {
|
|
36
|
-
return (0, core_1.getObjectProperty)(context, 'from', { first_name: '', id:
|
|
36
|
+
return (0, core_1.getObjectProperty)(context, 'from', { first_name: '', id: 0n, is_bot: false, username: '' });
|
|
37
37
|
}
|
|
38
|
-
return { first_name: '', id:
|
|
38
|
+
return { first_name: '', id: 0n, is_bot: false, username: '' };
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.ContextUtils = ContextUtils;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MessageEntity } from '@aracna/telegram-bot-types';
|
|
2
|
-
import { MessageBody } from '../definitions/interfaces';
|
|
1
|
+
import type { MessageEntity } from '@aracna/telegram-bot-types';
|
|
2
|
+
import type { MessageBody } from '../definitions/interfaces';
|
|
3
3
|
export declare class ReplyToMessageUtils {
|
|
4
4
|
static decodeBody<T>(entities: MessageEntity[]): MessageBody<T>;
|
|
5
|
-
static encodeBody<T>(data: T, type: string, chatID?:
|
|
5
|
+
static encodeBody<T>(data: T, type: string, chatID?: bigint): string;
|
|
6
6
|
}
|
package/utils/start.utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MessageBody } from '../definitions/interfaces';
|
|
1
|
+
import type { MessageBody } from '../definitions/interfaces';
|
|
2
2
|
export declare class StartUtils {
|
|
3
3
|
static decodeBody<T>(text?: string): MessageBody<T>;
|
|
4
|
-
static encodeBody<T>(data: T, type: string, chatID?:
|
|
5
|
-
static encodeBodyToHREF<T>(username: string, data: T, type: string, chatID?:
|
|
6
|
-
static encodeBodyToAnchorTag<T>(username: string, data: T, type: string, children: string, chatID?:
|
|
4
|
+
static encodeBody<T>(data: T, type: string, chatID?: bigint): string;
|
|
5
|
+
static encodeBodyToHREF<T>(username: string, data: T, type: string, chatID?: bigint): string;
|
|
6
|
+
static encodeBodyToAnchorTag<T>(username: string, data: T, type: string, children: string, chatID?: bigint): string;
|
|
7
7
|
}
|