@aracna/telegram-bot 2.0.3 → 2.0.4
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/apis/telegram-api.d.ts +7 -5
- package/apis/telegram-api.js +13 -4
- package/apis/telegram-file-api.d.ts +6 -4
- package/apis/telegram-file-api.js +12 -2
- package/classes/client.js +7 -7
- package/definitions/interfaces.d.ts +12 -0
- package/index.d.ts +150 -152
- package/package.json +2 -2
- package/requests/add-requests.d.ts +2 -1
- package/requests/add-requests.js +2 -2
- package/requests/answer-requests.d.ts +6 -5
- package/requests/answer-requests.js +10 -10
- package/requests/approve-requests.d.ts +2 -1
- package/requests/approve-requests.js +2 -2
- package/requests/ban-requests.d.ts +3 -2
- package/requests/ban-requests.js +4 -4
- package/requests/close-requests.d.ts +3 -2
- package/requests/close-requests.js +4 -4
- package/requests/copy-requests.d.ts +3 -2
- package/requests/copy-requests.js +4 -4
- package/requests/create-requests.d.ts +6 -5
- package/requests/create-requests.js +10 -10
- package/requests/decline-requests.d.ts +2 -1
- package/requests/decline-requests.js +2 -2
- package/requests/delete-requests.d.ts +9 -8
- package/requests/delete-requests.js +16 -16
- package/requests/download-requests.d.ts +3 -2
- package/requests/download-requests.js +6 -6
- package/requests/edit-requests.d.ts +10 -9
- package/requests/edit-requests.js +18 -18
- package/requests/export-requests.d.ts +2 -1
- package/requests/export-requests.js +2 -2
- package/requests/forward-requests.d.ts +3 -2
- package/requests/forward-requests.js +4 -4
- package/requests/get-requests.d.ts +22 -21
- package/requests/get-requests.js +42 -42
- package/requests/hide-requests.d.ts +2 -1
- package/requests/hide-requests.js +2 -2
- package/requests/leave-requests.d.ts +2 -1
- package/requests/leave-requests.js +2 -2
- package/requests/log-requests.d.ts +2 -1
- package/requests/log-requests.js +2 -2
- package/requests/pin-requests.d.ts +2 -1
- package/requests/pin-requests.js +2 -2
- package/requests/promote-requests.d.ts +2 -1
- package/requests/promote-requests.js +2 -2
- package/requests/refund-requests.d.ts +2 -1
- package/requests/refund-requests.js +2 -2
- package/requests/reopen-requests.d.ts +3 -2
- package/requests/reopen-requests.js +4 -4
- package/requests/replace-requests.d.ts +2 -1
- package/requests/replace-requests.js +2 -2
- package/requests/restrict-requests.d.ts +2 -1
- package/requests/restrict-requests.js +2 -2
- package/requests/revoke-requests.d.ts +2 -1
- package/requests/revoke-requests.js +2 -2
- package/requests/send-requests.d.ts +22 -22
- package/requests/send-requests.js +44 -44
- package/requests/set-requests.d.ts +23 -22
- package/requests/set-requests.js +44 -44
- package/requests/stop-requests.d.ts +3 -2
- package/requests/stop-requests.js +4 -4
- package/requests/unban-requests.d.ts +3 -2
- package/requests/unban-requests.js +4 -4
- package/requests/unhide-requests.d.ts +2 -1
- package/requests/unhide-requests.js +2 -2
- package/requests/unpin-requests.d.ts +5 -4
- package/requests/unpin-requests.js +8 -8
- package/requests/upload-requests.d.ts +2 -1
- package/requests/upload-requests.js +2 -2
- package/requests/webhook-requests.d.ts +5 -4
- package/requests/webhook-requests.js +8 -8
- package/utils/reply-to-message-utils.d.ts +3 -3
- package/utils/reply-to-message-utils.js +1 -1
- package/utils/start-message-utils.d.ts +3 -3
- package/definitions/telegram-api-definitions.d.ts +0 -12
- package/definitions/telegram-api-definitions.js +0 -2
package/index.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ import type { EditMessageReplyMarkup } from '@aracna/telegram-bot-types';
|
|
|
54
54
|
import type { EditMessageText } from '@aracna/telegram-bot-types';
|
|
55
55
|
import type { ExportChatInviteLink } from '@aracna/telegram-bot-types';
|
|
56
56
|
import { FetchError } from '@aracna/core';
|
|
57
|
-
import type { FetchResponse } from '@aracna/core';
|
|
58
57
|
import type { File as File_2 } from '@aracna/telegram-bot-types';
|
|
59
58
|
import type { ForumTopic } from '@aracna/telegram-bot-types';
|
|
60
59
|
import type { ForwardMessage } from '@aracna/telegram-bot-types';
|
|
@@ -174,33 +173,37 @@ import type { UserProfilePhotos } from '@aracna/telegram-bot-types';
|
|
|
174
173
|
import type { WebAppInfo } from '@aracna/telegram-bot-types';
|
|
175
174
|
import type { WebhookInfo } from '@aracna/telegram-bot-types';
|
|
176
175
|
|
|
177
|
-
export declare function addTelegramStickerToSet(
|
|
176
|
+
export declare function addTelegramStickerToSet(body: AddStickerToSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
178
177
|
|
|
179
|
-
export declare function answerTelegramCallbackQuery(
|
|
178
|
+
export declare function answerTelegramCallbackQuery(body: AnswerCallbackQuery, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
180
179
|
|
|
181
|
-
export declare function answerTelegramInlineQuery(
|
|
180
|
+
export declare function answerTelegramInlineQuery(body: AnswerInlineQuery, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
182
181
|
|
|
183
|
-
export declare function answerTelegramPreCheckoutQuery(
|
|
182
|
+
export declare function answerTelegramPreCheckoutQuery(body: AnswerPreCheckoutQuery, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
184
183
|
|
|
185
|
-
export declare function answerTelegramShippingQuery(
|
|
184
|
+
export declare function answerTelegramShippingQuery(body: AnswerShippingQuery, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
186
185
|
|
|
187
|
-
export declare function answerTelegramWebAppQuery(
|
|
186
|
+
export declare function answerTelegramWebAppQuery(body: AnswerWebAppQuery, config?: TelegramApiConfig): Promise<SentWebAppMessage | FetchError>;
|
|
188
187
|
|
|
189
|
-
declare class API extends RestAPI<
|
|
188
|
+
declare class API extends RestAPI<TelegramApiConfig> {
|
|
190
189
|
queue: Queue;
|
|
191
|
-
post<V, W, X = undefined>(path: string, body: W | undefined, config
|
|
192
|
-
transformBody<V>(method: RequestMethod, path: string, body: V, config:
|
|
190
|
+
post<V, W, X = undefined>(path: string, body: W | undefined, config?: TelegramApiConfig): Promise<V | FetchError<X>>;
|
|
191
|
+
transformBody<V>(method: RequestMethod, path: string, body: V, config: TelegramApiConfig): Promise<V | FormData | undefined>;
|
|
192
|
+
getToken(): string | undefined;
|
|
193
|
+
setToken(token?: string): this;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
declare class API_2 extends RestAPI<
|
|
196
|
-
get<V, W = undefined>(path: string, config
|
|
196
|
+
declare class API_2 extends RestAPI<TelegramFileApiConfig> {
|
|
197
|
+
get<V, W = undefined>(path: string, config?: TelegramFileApiConfig): Promise<V | FetchError<W>>;
|
|
198
|
+
getToken(): string | undefined;
|
|
199
|
+
setToken(token?: string): this;
|
|
197
200
|
}
|
|
198
201
|
|
|
199
|
-
export declare function approveTelegramChatJoinRequest(
|
|
202
|
+
export declare function approveTelegramChatJoinRequest(body: ApproveChatJoinRequest, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
200
203
|
|
|
201
|
-
export declare function banTelegramChatMember(
|
|
204
|
+
export declare function banTelegramChatMember(body: BanChatMember, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
202
205
|
|
|
203
|
-
export declare function banTelegramChatSenderChat(
|
|
206
|
+
export declare function banTelegramChatSenderChat(body: BanChatSenderChat, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
204
207
|
|
|
205
208
|
export declare interface CallbackQuery<T = any> extends CallbackQuery_2 {
|
|
206
209
|
body: CallbackQueryBody<T>;
|
|
@@ -212,11 +215,11 @@ export declare interface CallbackQueryBody<T = any> {
|
|
|
212
215
|
m?: string;
|
|
213
216
|
}
|
|
214
217
|
|
|
215
|
-
export declare function closeTelegramForumTopic(
|
|
218
|
+
export declare function closeTelegramForumTopic(body: CloseForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
216
219
|
|
|
217
|
-
export declare function closeTelegramGeneralForumTopic(
|
|
220
|
+
export declare function closeTelegramGeneralForumTopic(body: CloseGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
218
221
|
|
|
219
|
-
export declare function closeTelegramWebhook(
|
|
222
|
+
export declare function closeTelegramWebhook(config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
220
223
|
|
|
221
224
|
export declare interface Context {
|
|
222
225
|
business_connection: BusinessConnection;
|
|
@@ -246,21 +249,21 @@ export declare interface Context {
|
|
|
246
249
|
start: Start;
|
|
247
250
|
}
|
|
248
251
|
|
|
249
|
-
export declare function copyTelegramMessage(
|
|
252
|
+
export declare function copyTelegramMessage(body: CopyMessage, config?: TelegramApiConfig): Promise<MessageId | FetchError>;
|
|
250
253
|
|
|
251
|
-
export declare function copyTelegramMessages(
|
|
254
|
+
export declare function copyTelegramMessages(body: CopyMessages, config?: TelegramApiConfig): Promise<MessageId[] | FetchError>;
|
|
252
255
|
|
|
253
|
-
export declare function createTelegramChatInviteLink(
|
|
256
|
+
export declare function createTelegramChatInviteLink(body: CreateChatInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
|
|
254
257
|
|
|
255
|
-
export declare function createTelegramChatSubscriptionInviteLink(
|
|
258
|
+
export declare function createTelegramChatSubscriptionInviteLink(body: CreateChatSubscriptionInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
|
|
256
259
|
|
|
257
|
-
export declare function createTelegramForumTopic(
|
|
260
|
+
export declare function createTelegramForumTopic(body: CreateForumTopic, config?: TelegramApiConfig): Promise<ForumTopic | FetchError>;
|
|
258
261
|
|
|
259
|
-
export declare function createTelegramInvoiceLink(
|
|
262
|
+
export declare function createTelegramInvoiceLink(body: CreateInvoiceLink, config?: TelegramApiConfig): Promise<string | FetchError>;
|
|
260
263
|
|
|
261
|
-
export declare function createTelegramNewStickerSet(
|
|
264
|
+
export declare function createTelegramNewStickerSet(body: CreateNewStickerSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
262
265
|
|
|
263
|
-
export declare function declineTelegramChatJoinRequest(
|
|
266
|
+
export declare function declineTelegramChatJoinRequest(body: DeclineChatJoinRequest, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
264
267
|
|
|
265
268
|
export declare function decodeTelegramCallbackQueryBody<T>(data?: string): CallbackQueryBody<T>;
|
|
266
269
|
|
|
@@ -280,49 +283,49 @@ export declare const DEFAULT_TELEGRAM_REPLY_TO_MESSAGE_BODY: () => ReplyToMessag
|
|
|
280
283
|
|
|
281
284
|
export declare const DEFAULT_TELEGRAM_START_MESSAGE_BODY: () => StartBody<any>;
|
|
282
285
|
|
|
283
|
-
export declare function deleteTelegramChatPhoto(
|
|
286
|
+
export declare function deleteTelegramChatPhoto(body: DeleteChatPhoto, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
284
287
|
|
|
285
|
-
export declare function deleteTelegramChatStickerSet(
|
|
288
|
+
export declare function deleteTelegramChatStickerSet(body: DeleteChatStickerSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
286
289
|
|
|
287
|
-
export declare function deleteTelegramCommands(
|
|
290
|
+
export declare function deleteTelegramCommands(body?: DeleteMyCommands, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
288
291
|
|
|
289
|
-
export declare function deleteTelegramForumTopic(
|
|
292
|
+
export declare function deleteTelegramForumTopic(body: DeleteForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
290
293
|
|
|
291
|
-
export declare function deleteTelegramMessage(
|
|
294
|
+
export declare function deleteTelegramMessage(body: DeleteMessage, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
292
295
|
|
|
293
|
-
export declare function deleteTelegramMessages(
|
|
296
|
+
export declare function deleteTelegramMessages(body: DeleteMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
294
297
|
|
|
295
|
-
export declare function deleteTelegramStickerFromSet(
|
|
298
|
+
export declare function deleteTelegramStickerFromSet(body: DeleteStickerFromSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
296
299
|
|
|
297
|
-
export declare function deleteTelegramStickerSet(
|
|
300
|
+
export declare function deleteTelegramStickerSet(body: DeleteStickerSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
298
301
|
|
|
299
|
-
export declare function deleteTelegramWebhook(
|
|
302
|
+
export declare function deleteTelegramWebhook(body?: DeleteWebhook, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
300
303
|
|
|
301
|
-
export declare function downloadTelegramFile(
|
|
304
|
+
export declare function downloadTelegramFile(fileID: string, config?: TelegramApiConfig & TelegramFileApiConfig): Promise<Blob | FetchError>;
|
|
302
305
|
|
|
303
|
-
export declare function downloadTelegramUserFirstProfilePhoto(
|
|
306
|
+
export declare function downloadTelegramUserFirstProfilePhoto(userID: bigint | number, config?: TelegramApiConfig & TelegramFileApiConfig): Promise<Blob | FetchError | Error>;
|
|
304
307
|
|
|
305
308
|
export declare interface EditMessageMediaAlternative extends Omit<EditMessageMedia, 'media'> {
|
|
306
309
|
media: InputMediaAlternative;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
|
-
export declare function editTelegramChatInviteLink(
|
|
312
|
+
export declare function editTelegramChatInviteLink(body: EditChatInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
|
|
310
313
|
|
|
311
|
-
export declare function editTelegramChatSubscriptionInviteLink(
|
|
314
|
+
export declare function editTelegramChatSubscriptionInviteLink(body: EditChatSubscriptionInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
|
|
312
315
|
|
|
313
|
-
export declare function editTelegramForumTopic(
|
|
316
|
+
export declare function editTelegramForumTopic(body: EditForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
314
317
|
|
|
315
|
-
export declare function editTelegramGeneralForumTopic(
|
|
318
|
+
export declare function editTelegramGeneralForumTopic(body: EditGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
316
319
|
|
|
317
|
-
export declare function editTelegramMessageCaption(
|
|
320
|
+
export declare function editTelegramMessageCaption(body: EditMessageCaption, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
318
321
|
|
|
319
|
-
export declare function editTelegramMessageLiveLocation(
|
|
322
|
+
export declare function editTelegramMessageLiveLocation(body: EditMessageLiveLocation, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
320
323
|
|
|
321
|
-
export declare function editTelegramMessageMedia(
|
|
324
|
+
export declare function editTelegramMessageMedia(body: EditMessageMediaAlternative, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
322
325
|
|
|
323
|
-
export declare function editTelegramMessageReplyMarkup(
|
|
326
|
+
export declare function editTelegramMessageReplyMarkup(body: EditMessageReplyMarkup, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
324
327
|
|
|
325
|
-
export declare function editTelegramMessageText(
|
|
328
|
+
export declare function editTelegramMessageText(body: EditMessageText, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
326
329
|
|
|
327
330
|
export declare function encodeTelegramCallbackQueryBody<T>(options?: EncodeTelegramCallbackQueryBodyOptions<T>): string;
|
|
328
331
|
|
|
@@ -332,7 +335,7 @@ export declare interface EncodeTelegramCallbackQueryBodyOptions<T = any> {
|
|
|
332
335
|
data?: T;
|
|
333
336
|
}
|
|
334
337
|
|
|
335
|
-
export declare function encodeTelegramReplyToMessageBody<T>(options?: EncodeTelegramReplyToMessageBodyOptions): string;
|
|
338
|
+
export declare function encodeTelegramReplyToMessageBody<T>(options?: EncodeTelegramReplyToMessageBodyOptions<T>): string;
|
|
336
339
|
|
|
337
340
|
export declare interface EncodeTelegramReplyToMessageBodyOptions<T = any> {
|
|
338
341
|
chatID?: bigint | number;
|
|
@@ -340,9 +343,9 @@ export declare interface EncodeTelegramReplyToMessageBodyOptions<T = any> {
|
|
|
340
343
|
data?: T;
|
|
341
344
|
}
|
|
342
345
|
|
|
343
|
-
export declare function encodeTelegramReplyToMessageBodyToAnchorTag<T>(options?: EncodeTelegramReplyToMessageBodyOptions): string;
|
|
346
|
+
export declare function encodeTelegramReplyToMessageBodyToAnchorTag<T>(options?: EncodeTelegramReplyToMessageBodyOptions<T>): string;
|
|
344
347
|
|
|
345
|
-
export declare function encodeTelegramReplyToMessageBodyToURL<T>(options?: EncodeTelegramReplyToMessageBodyOptions): string;
|
|
348
|
+
export declare function encodeTelegramReplyToMessageBodyToURL<T>(options?: EncodeTelegramReplyToMessageBodyOptions<T>): string;
|
|
346
349
|
|
|
347
350
|
export declare function encodeTelegramStartBody<T>(options?: EncodeTelegramStartBodyOptions): string;
|
|
348
351
|
|
|
@@ -352,39 +355,39 @@ export declare interface EncodeTelegramStartBodyOptions<T = any> {
|
|
|
352
355
|
data?: T;
|
|
353
356
|
}
|
|
354
357
|
|
|
355
|
-
export declare function encodeTelegramStartBodyToAnchorTag<T>(username: string, children: string, options?: EncodeTelegramStartBodyOptions): string;
|
|
358
|
+
export declare function encodeTelegramStartBodyToAnchorTag<T>(username: string, children: string, options?: EncodeTelegramStartBodyOptions<T>): string;
|
|
356
359
|
|
|
357
|
-
export declare function encodeTelegramStartBodyToText<T>(options?: EncodeTelegramStartBodyOptions): string;
|
|
360
|
+
export declare function encodeTelegramStartBodyToText<T>(options?: EncodeTelegramStartBodyOptions<T>): string;
|
|
358
361
|
|
|
359
|
-
export declare function encodeTelegramStartBodyToURL<T>(username: string, options?: EncodeTelegramStartBodyOptions): string;
|
|
362
|
+
export declare function encodeTelegramStartBodyToURL<T>(username: string, options?: EncodeTelegramStartBodyOptions<T>): string;
|
|
360
363
|
|
|
361
|
-
export declare function exportTelegramChatInviteLink(
|
|
364
|
+
export declare function exportTelegramChatInviteLink(body: ExportChatInviteLink, config?: TelegramApiConfig): Promise<string | FetchError>;
|
|
362
365
|
|
|
363
|
-
export declare function forwardTelegramMessage(
|
|
366
|
+
export declare function forwardTelegramMessage(body: ForwardMessage, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
364
367
|
|
|
365
|
-
export declare function forwardTelegramMessages(
|
|
368
|
+
export declare function forwardTelegramMessages(body: ForwardMessages, config?: TelegramApiConfig): Promise<MessageId[] | FetchError>;
|
|
366
369
|
|
|
367
|
-
export declare function getMyTelegramCommands(
|
|
370
|
+
export declare function getMyTelegramCommands(body?: GetMyCommands, config?: TelegramApiConfig): Promise<BotCommand[] | FetchError>;
|
|
368
371
|
|
|
369
|
-
export declare function getMyTelegramDefaultAdministratorRights(
|
|
372
|
+
export declare function getMyTelegramDefaultAdministratorRights(body?: GetMyDefaultAdministratorRights, config?: TelegramApiConfig): Promise<ChatAdministratorRights | FetchError>;
|
|
370
373
|
|
|
371
|
-
export declare function getMyTelegramDescription(
|
|
374
|
+
export declare function getMyTelegramDescription(body?: GetMyDescription, config?: TelegramApiConfig): Promise<BotDescription | FetchError>;
|
|
372
375
|
|
|
373
|
-
export declare function getMyTelegramName(
|
|
376
|
+
export declare function getMyTelegramName(body?: GetMyName, config?: TelegramApiConfig): Promise<BotName | FetchError>;
|
|
374
377
|
|
|
375
|
-
export declare function getMyTelegramShortDescription(
|
|
378
|
+
export declare function getMyTelegramShortDescription(body?: GetMyShortDescription, config?: TelegramApiConfig): Promise<BotShortDescription | FetchError>;
|
|
376
379
|
|
|
377
|
-
export declare function getTelegramBusinessConnection(
|
|
380
|
+
export declare function getTelegramBusinessConnection(body: GetBusinessConnection, config?: TelegramApiConfig): Promise<BusinessConnection | FetchError>;
|
|
378
381
|
|
|
379
|
-
export declare function getTelegramChat(
|
|
382
|
+
export declare function getTelegramChat(body: GetChat, config?: TelegramApiConfig): Promise<Chat | FetchError>;
|
|
380
383
|
|
|
381
|
-
export declare function getTelegramChatAdministrators(
|
|
384
|
+
export declare function getTelegramChatAdministrators(body: GetChatAdministrators, config?: TelegramApiConfig): Promise<ChatMember[] | FetchError>;
|
|
382
385
|
|
|
383
|
-
export declare function getTelegramChatMember(
|
|
386
|
+
export declare function getTelegramChatMember(body: GetChatMember, config?: TelegramApiConfig): Promise<ChatMember | FetchError>;
|
|
384
387
|
|
|
385
|
-
export declare function getTelegramChatMemberCount(
|
|
388
|
+
export declare function getTelegramChatMemberCount(body: GetChatMemberCount, config?: TelegramApiConfig): Promise<number | FetchError>;
|
|
386
389
|
|
|
387
|
-
export declare function getTelegramChatMenuButton(
|
|
390
|
+
export declare function getTelegramChatMenuButton(body: GetChatMenuButton, config?: TelegramApiConfig): Promise<MenuButton | FetchError>;
|
|
388
391
|
|
|
389
392
|
export declare function getTelegramCommand(string: string | undefined): string | undefined;
|
|
390
393
|
|
|
@@ -406,13 +409,13 @@ export declare function getTelegramContextUserLastName<T extends UpdateType>(con
|
|
|
406
409
|
|
|
407
410
|
export declare function getTelegramContextUserUsername<T extends UpdateType>(context: Context[T]): string | undefined;
|
|
408
411
|
|
|
409
|
-
export declare function getTelegramCustomEmojiStickers(
|
|
412
|
+
export declare function getTelegramCustomEmojiStickers(body: GetCustomEmojiStickers, config?: TelegramApiConfig): Promise<Sticker[] | FetchError>;
|
|
410
413
|
|
|
411
|
-
export declare function getTelegramFile(
|
|
414
|
+
export declare function getTelegramFile(body: GetFile, config?: TelegramApiConfig): Promise<File_2 | FetchError>;
|
|
412
415
|
|
|
413
|
-
export declare function getTelegramForumTopicIconStickers(
|
|
416
|
+
export declare function getTelegramForumTopicIconStickers(config?: TelegramApiConfig): Promise<Sticker[] | FetchError>;
|
|
414
417
|
|
|
415
|
-
export declare function getTelegramGameHighScores(
|
|
418
|
+
export declare function getTelegramGameHighScores(body: GetGameHighScores, config?: TelegramApiConfig): Promise<GameHighScore[] | FetchError>;
|
|
416
419
|
|
|
417
420
|
export declare function getTelegramInlineKeyboardCallbackButton<T>(text: string, options?: EncodeTelegramCallbackQueryBodyOptions): InlineKeyboardButton;
|
|
418
421
|
|
|
@@ -434,23 +437,23 @@ export declare function getTelegramInlineKeyboardUrlButton(text: string, url: st
|
|
|
434
437
|
|
|
435
438
|
export declare function getTelegramInlineKeyboardWebAppButton(text: string, app: WebAppInfo): InlineKeyboardButton;
|
|
436
439
|
|
|
437
|
-
export declare function getTelegramMe(
|
|
440
|
+
export declare function getTelegramMe(config?: TelegramApiConfig): Promise<User | FetchError>;
|
|
438
441
|
|
|
439
442
|
export declare function getTelegramProgressHTML(value: number, min?: number, max?: number, size?: number): string;
|
|
440
443
|
|
|
441
|
-
export declare function getTelegramStarTransactions(
|
|
444
|
+
export declare function getTelegramStarTransactions(body?: GetStarTransactions, config?: TelegramApiConfig): Promise<StarTransactions | FetchError>;
|
|
442
445
|
|
|
443
|
-
export declare function getTelegramStickerSet(
|
|
446
|
+
export declare function getTelegramStickerSet(body: GetStickerSet, config?: TelegramApiConfig): Promise<StickerSet | FetchError>;
|
|
444
447
|
|
|
445
|
-
export declare function getTelegramUpdates(
|
|
448
|
+
export declare function getTelegramUpdates(body?: GetUpdates, config?: TelegramApiConfig): Promise<Update[] | FetchError>;
|
|
446
449
|
|
|
447
|
-
export declare function getTelegramUserChatBoosts(
|
|
450
|
+
export declare function getTelegramUserChatBoosts(body: GetUserChatBoosts, config?: TelegramApiConfig): Promise<UserChatBoosts | FetchError>;
|
|
448
451
|
|
|
449
|
-
export declare function getTelegramUserProfilePhotos(
|
|
452
|
+
export declare function getTelegramUserProfilePhotos(body: GetUserProfilePhotos, config?: TelegramApiConfig): Promise<UserProfilePhotos | FetchError>;
|
|
450
453
|
|
|
451
|
-
export declare function getTelegramWebhookInfo(
|
|
454
|
+
export declare function getTelegramWebhookInfo(config?: TelegramApiConfig): Promise<WebhookInfo | FetchError>;
|
|
452
455
|
|
|
453
|
-
export declare function hideTelegramGeneralForumTopic(
|
|
456
|
+
export declare function hideTelegramGeneralForumTopic(body: HideGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
454
457
|
|
|
455
458
|
export declare type InputFile = File | string;
|
|
456
459
|
|
|
@@ -462,27 +465,27 @@ export declare interface InputPaidMediaAlternative extends Omit<InputMediaPhoto
|
|
|
462
465
|
media: InputFile;
|
|
463
466
|
}
|
|
464
467
|
|
|
465
|
-
export declare function leaveTelegramChat(
|
|
468
|
+
export declare function leaveTelegramChat(body: LeaveChat, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
466
469
|
|
|
467
|
-
export declare function logOutTelegram(
|
|
470
|
+
export declare function logOutTelegram(config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
468
471
|
|
|
469
472
|
export declare function omitTelegramCommand(string: string | undefined): string;
|
|
470
473
|
|
|
471
|
-
export declare function pinTelegramChatMessage(
|
|
474
|
+
export declare function pinTelegramChatMessage(body: PinChatMessage, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
472
475
|
|
|
473
|
-
export declare function promoteTelegramChatMember(
|
|
476
|
+
export declare function promoteTelegramChatMember(body: PromoteChatMember, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
474
477
|
|
|
475
|
-
export declare function refundTelegramStarPayment(
|
|
478
|
+
export declare function refundTelegramStarPayment(body: RefundStarPayment, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
476
479
|
|
|
477
480
|
export declare const REGEXP_TELEGRAM_COMMAND: RegExp;
|
|
478
481
|
|
|
479
482
|
export declare const REGEXP_TELEGRAM_COMMAND_WITH_USERNAME: RegExp;
|
|
480
483
|
|
|
481
|
-
export declare function reopenTelegramForumTopic(
|
|
484
|
+
export declare function reopenTelegramForumTopic(body: ReopenForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
482
485
|
|
|
483
|
-
export declare function reopenTelegramGeneralForumTopic(
|
|
486
|
+
export declare function reopenTelegramGeneralForumTopic(body: ReopenGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
484
487
|
|
|
485
|
-
export declare function replaceTelegramStickerInSet(
|
|
488
|
+
export declare function replaceTelegramStickerInSet(body: ReplaceStickerInSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
486
489
|
|
|
487
490
|
export declare interface ReplyToMessage<T = any> extends Message {
|
|
488
491
|
body: ReplyToMessageBody<T>;
|
|
@@ -494,9 +497,9 @@ export declare interface ReplyToMessageBody<T = any> {
|
|
|
494
497
|
m?: string;
|
|
495
498
|
}
|
|
496
499
|
|
|
497
|
-
export declare function restrictTelegramChatMember(
|
|
500
|
+
export declare function restrictTelegramChatMember(body: RestrictChatMember, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
498
501
|
|
|
499
|
-
export declare function revokeTelegramChatInviteLink(
|
|
502
|
+
export declare function revokeTelegramChatInviteLink(body: RevokeChatInviteLink, config?: TelegramApiConfig): Promise<ChatInviteLink | FetchError>;
|
|
500
503
|
|
|
501
504
|
export declare function sanitizeTelegramHTML(text: string): string;
|
|
502
505
|
|
|
@@ -514,93 +517,93 @@ export declare interface SendRepliableMessage<T = any> extends SendMessage {
|
|
|
514
517
|
from_chat_id?: bigint;
|
|
515
518
|
}
|
|
516
519
|
|
|
517
|
-
export declare function sendTelegramAnimation(
|
|
520
|
+
export declare function sendTelegramAnimation(body: SendAnimation, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
518
521
|
|
|
519
|
-
export declare function sendTelegramAudio(
|
|
522
|
+
export declare function sendTelegramAudio(body: SendAudio, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
520
523
|
|
|
521
|
-
export declare function sendTelegramChatAction(
|
|
524
|
+
export declare function sendTelegramChatAction(body: SendChatAction, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
522
525
|
|
|
523
|
-
export declare function sendTelegramContact(
|
|
526
|
+
export declare function sendTelegramContact(body: SendContact, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
524
527
|
|
|
525
|
-
export declare function sendTelegramDice(
|
|
528
|
+
export declare function sendTelegramDice(body: SendDice, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
526
529
|
|
|
527
|
-
export declare function sendTelegramDocument(
|
|
530
|
+
export declare function sendTelegramDocument(body: SendDocument, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
528
531
|
|
|
529
|
-
export declare function sendTelegramGame(
|
|
532
|
+
export declare function sendTelegramGame(body: SendGame, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
530
533
|
|
|
531
|
-
export declare function sendTelegramInvoice(
|
|
534
|
+
export declare function sendTelegramInvoice(body: SendInvoice, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
532
535
|
|
|
533
|
-
export declare function sendTelegramLocation(
|
|
536
|
+
export declare function sendTelegramLocation(body: SendLocation, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
534
537
|
|
|
535
|
-
export declare function sendTelegramMediaGroup(
|
|
538
|
+
export declare function sendTelegramMediaGroup(body: SendMediaGroupAlternative, config?: TelegramApiConfig): Promise<Message[] | FetchError>;
|
|
536
539
|
|
|
537
|
-
export declare function sendTelegramMessage(
|
|
540
|
+
export declare function sendTelegramMessage(body: SendMessage, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
538
541
|
|
|
539
|
-
export declare function sendTelegramMessageHTML(
|
|
542
|
+
export declare function sendTelegramMessageHTML(body: SendMessage, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
540
543
|
|
|
541
|
-
export declare function sendTelegramPaidMedia(
|
|
544
|
+
export declare function sendTelegramPaidMedia(body: SendPaidMediaAlternative, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
542
545
|
|
|
543
|
-
export declare function sendTelegramPhoto(
|
|
546
|
+
export declare function sendTelegramPhoto(body: SendPhoto, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
544
547
|
|
|
545
|
-
export declare function sendTelegramPoll(
|
|
548
|
+
export declare function sendTelegramPoll(body: SendPoll, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
546
549
|
|
|
547
|
-
export declare function sendTelegramRepliableMessage<T>(
|
|
550
|
+
export declare function sendTelegramRepliableMessage<T>(body: SendRepliableMessage<T>, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
548
551
|
|
|
549
|
-
export declare function sendTelegramSticker(
|
|
552
|
+
export declare function sendTelegramSticker(body: SendSticker, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
550
553
|
|
|
551
|
-
export declare function sendTelegramVenue(
|
|
554
|
+
export declare function sendTelegramVenue(body: SendVenue, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
552
555
|
|
|
553
|
-
export declare function sendTelegramVideo(
|
|
556
|
+
export declare function sendTelegramVideo(body: SendVideo, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
554
557
|
|
|
555
|
-
export declare function sendTelegramVideoNote(
|
|
558
|
+
export declare function sendTelegramVideoNote(body: SendVideoNote, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
556
559
|
|
|
557
|
-
export declare function sendTelegramVoice(
|
|
560
|
+
export declare function sendTelegramVoice(body: SendVoice, config?: TelegramApiConfig): Promise<Message | FetchError>;
|
|
558
561
|
|
|
559
|
-
export declare function setMyTelegramCommands(
|
|
562
|
+
export declare function setMyTelegramCommands(body: SetMyCommands, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
560
563
|
|
|
561
|
-
export declare function setMyTelegramDefaultAdministratorRights(
|
|
564
|
+
export declare function setMyTelegramDefaultAdministratorRights(body: SetMyDefaultAdministratorRights, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
562
565
|
|
|
563
|
-
export declare function setMyTelegramDescription(
|
|
566
|
+
export declare function setMyTelegramDescription(body: SetMyDescription, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
564
567
|
|
|
565
|
-
export declare function setMyTelegramName(
|
|
568
|
+
export declare function setMyTelegramName(body: SetMyName, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
566
569
|
|
|
567
|
-
export declare function setMyTelegramShortDescription(
|
|
570
|
+
export declare function setMyTelegramShortDescription(body: SetMyShortDescription, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
568
571
|
|
|
569
|
-
export declare function setTelegramChatAdministratorCustomTitle(
|
|
572
|
+
export declare function setTelegramChatAdministratorCustomTitle(body: SetChatAdministratorCustomTitle, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
570
573
|
|
|
571
|
-
export declare function setTelegramChatDescription(
|
|
574
|
+
export declare function setTelegramChatDescription(body: SetChatDescription, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
572
575
|
|
|
573
|
-
export declare function setTelegramChatMenuButton(
|
|
576
|
+
export declare function setTelegramChatMenuButton(body: SetChatMenuButton, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
574
577
|
|
|
575
|
-
export declare function setTelegramChatPermissions(
|
|
578
|
+
export declare function setTelegramChatPermissions(body: SetChatPermissions, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
576
579
|
|
|
577
|
-
export declare function setTelegramChatPhoto(
|
|
580
|
+
export declare function setTelegramChatPhoto(body: SetChatPhoto, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
578
581
|
|
|
579
|
-
export declare function setTelegramChatStickerSet(
|
|
582
|
+
export declare function setTelegramChatStickerSet(body: SetChatStickerSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
580
583
|
|
|
581
|
-
export declare function setTelegramChatTitle(
|
|
584
|
+
export declare function setTelegramChatTitle(body: SetChatTitle, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
582
585
|
|
|
583
|
-
export declare function setTelegramCustomEmojiStickerSetThumbnail(
|
|
586
|
+
export declare function setTelegramCustomEmojiStickerSetThumbnail(body: SetCustomEmojiStickerSetThumbnail, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
584
587
|
|
|
585
|
-
export declare function setTelegramGameScore(
|
|
588
|
+
export declare function setTelegramGameScore(body: SetGameScore, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
586
589
|
|
|
587
|
-
export declare function setTelegramMessageReaction(
|
|
590
|
+
export declare function setTelegramMessageReaction(body: SetMessageReaction, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
588
591
|
|
|
589
|
-
export declare function setTelegramPassportDataErrors(
|
|
592
|
+
export declare function setTelegramPassportDataErrors(body: SetPassportDataErrors, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
590
593
|
|
|
591
|
-
export declare function setTelegramStickerEmojiList(
|
|
594
|
+
export declare function setTelegramStickerEmojiList(body: SetStickerEmojiList, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
592
595
|
|
|
593
|
-
export declare function setTelegramStickerKeywords(
|
|
596
|
+
export declare function setTelegramStickerKeywords(body: SetStickerKeywords, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
594
597
|
|
|
595
|
-
export declare function setTelegramStickerMaskPosition(
|
|
598
|
+
export declare function setTelegramStickerMaskPosition(body: SetStickerMaskPosition, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
596
599
|
|
|
597
|
-
export declare function setTelegramStickerPositionInSet(
|
|
600
|
+
export declare function setTelegramStickerPositionInSet(body: SetStickerPositionInSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
598
601
|
|
|
599
|
-
export declare function setTelegramStickerSetThumbnail(
|
|
602
|
+
export declare function setTelegramStickerSetThumbnail(body: SetStickerSetThumbnail, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
600
603
|
|
|
601
|
-
export declare function setTelegramStickerSetTitle(
|
|
604
|
+
export declare function setTelegramStickerSetTitle(body: SetStickerSetTitle, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
602
605
|
|
|
603
|
-
export declare function setTelegramWebhook(
|
|
606
|
+
export declare function setTelegramWebhook(body: SetWebhook, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
604
607
|
|
|
605
608
|
export declare interface Start<T = any> extends Message {
|
|
606
609
|
body: StartBody<T>;
|
|
@@ -612,22 +615,14 @@ export declare interface StartBody<T = any> {
|
|
|
612
615
|
m?: string;
|
|
613
616
|
}
|
|
614
617
|
|
|
615
|
-
export declare function stopTelegramMessageLiveLocation(
|
|
618
|
+
export declare function stopTelegramMessageLiveLocation(body: StopMessageLiveLocation, config?: TelegramApiConfig): Promise<Message | boolean | FetchError>;
|
|
616
619
|
|
|
617
|
-
export declare function stopTelegramPoll(
|
|
620
|
+
export declare function stopTelegramPoll(body: StopPoll, config?: TelegramApiConfig): Promise<Poll | FetchError>;
|
|
618
621
|
|
|
619
622
|
export declare const TelegramAPI: API;
|
|
620
623
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
token: string | undefined;
|
|
624
|
-
}
|
|
625
|
-
export interface Response<T> extends FetchResponse<ResponseData<T>> {
|
|
626
|
-
}
|
|
627
|
-
export interface ResponseData<T> {
|
|
628
|
-
ok: boolean;
|
|
629
|
-
result: T;
|
|
630
|
-
}
|
|
624
|
+
declare interface TelegramApiConfig extends RestApiConfig {
|
|
625
|
+
token?: string;
|
|
631
626
|
}
|
|
632
627
|
|
|
633
628
|
export declare const TelegramClassLogger: Logger;
|
|
@@ -715,26 +710,29 @@ export declare interface TelegramClientListenerOptions {
|
|
|
715
710
|
|
|
716
711
|
export declare const TelegramFileAPI: API_2;
|
|
717
712
|
|
|
713
|
+
declare interface TelegramFileApiConfig extends TelegramApiConfig {
|
|
714
|
+
}
|
|
715
|
+
|
|
718
716
|
export declare enum TelegramLoggerName {
|
|
719
717
|
CLASS = "TELEGRAM_CLASS"
|
|
720
718
|
}
|
|
721
719
|
|
|
722
|
-
export declare function unbanTelegramChatMember(
|
|
720
|
+
export declare function unbanTelegramChatMember(body: UnbanChatMember, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
723
721
|
|
|
724
|
-
export declare function unbanTelegramChatSenderChat(
|
|
722
|
+
export declare function unbanTelegramChatSenderChat(body: UnbanChatSenderChat, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
725
723
|
|
|
726
|
-
export declare function unhideTelegramGeneralForumTopic(
|
|
724
|
+
export declare function unhideTelegramGeneralForumTopic(body: HideGeneralForumTopic, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
727
725
|
|
|
728
|
-
export declare function unpinAllTelegramChatMessages(
|
|
726
|
+
export declare function unpinAllTelegramChatMessages(body: UnpinAllChatMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
729
727
|
|
|
730
|
-
export declare function unpinAllTelegramForumTopicMessages(
|
|
728
|
+
export declare function unpinAllTelegramForumTopicMessages(body: UnpinAllForumTopicMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
731
729
|
|
|
732
|
-
export declare function unpinAllTelegramGeneralForumTopicMessages(
|
|
730
|
+
export declare function unpinAllTelegramGeneralForumTopicMessages(body: UnpinAllGeneralForumTopicMessages, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
733
731
|
|
|
734
|
-
export declare function unpinTelegramChatMessage(
|
|
732
|
+
export declare function unpinTelegramChatMessage(body: UnpinChatMessage, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
|
735
733
|
|
|
736
734
|
export declare type UpdateType = 'business_connection' | 'business_message' | 'callback_query' | 'channel_post' | 'chat_boost' | 'chat_join_request' | 'chat_member' | 'chosen_inline_result' | 'deleted_business_messages' | 'edited_business_message' | 'edited_channel_post' | 'edited_message' | 'inline_query' | 'message' | 'message_reaction' | 'message_reaction_count' | 'my_chat_member' | 'poll' | 'poll_answer' | 'pre_checkout_query' | 'removed_chat_boost' | 'reply_to_message' | 'shipping_query' | 'start';
|
|
737
735
|
|
|
738
|
-
export declare function uploadTelegramStickerFile(
|
|
736
|
+
export declare function uploadTelegramStickerFile(body: UploadStickerFile, config?: TelegramApiConfig): Promise<File_2 | FetchError>;
|
|
739
737
|
|
|
740
738
|
export { }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Dario Sechi",
|
|
3
3
|
"devDependencies": {
|
|
4
|
-
"@aracna/core": "^1.1.
|
|
4
|
+
"@aracna/core": "^1.1.91",
|
|
5
5
|
"@aracna/telegram-bot-types": "^1.2.14",
|
|
6
6
|
"@fastify/multipart": "^8.3.0",
|
|
7
7
|
"@microsoft/api-extractor": "^7.47.5",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"repository": "https://github.com/aracna/telegram-bot",
|
|
38
38
|
"types": "index.d.ts",
|
|
39
|
-
"version": "2.0.
|
|
39
|
+
"version": "2.0.4",
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "rm -rf dist && pnpm tsc && pnpm api-extractor run --local",
|
|
42
42
|
"prepublish": "pnpm test && pnpm build && cp LICENSE package.json README.md dist",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { FetchError } from '@aracna/core';
|
|
2
2
|
import type { AddStickerToSet } from '@aracna/telegram-bot-types';
|
|
3
|
-
|
|
3
|
+
import { TelegramApiConfig } from '../definitions/interfaces';
|
|
4
|
+
export declare function addStickerToSet(body: AddStickerToSet, config?: TelegramApiConfig): Promise<boolean | FetchError>;
|
package/requests/add-requests.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addStickerToSet = addStickerToSet;
|
|
4
4
|
const telegram_api_1 = require("../apis/telegram-api");
|
|
5
|
-
async function addStickerToSet(
|
|
5
|
+
async function addStickerToSet(body, config) {
|
|
6
6
|
return telegram_api_1.TelegramAPI.post('addStickerToSet', {
|
|
7
7
|
...body,
|
|
8
8
|
sticker: {
|
|
@@ -10,5 +10,5 @@ async function addStickerToSet(token, body) {
|
|
|
10
10
|
sticker: body.sticker.sticker instanceof Blob ? `attach://sticker_blob` : body.sticker.sticker
|
|
11
11
|
},
|
|
12
12
|
...(body.sticker.sticker instanceof Blob && { sticker_blob: body.sticker.sticker })
|
|
13
|
-
},
|
|
13
|
+
}, config);
|
|
14
14
|
}
|