nyx-bot-client 0.0.2
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/.env.sample +4 -0
- package/.vscode/extensions.json +11 -0
- package/.vscode/settings.json +17 -0
- package/.zed/settings.json +20 -0
- package/@types/AcceptedGiftTypes.ts +26 -0
- package/@types/AffiliateInfo.ts +35 -0
- package/@types/Animation.ts +56 -0
- package/@types/Audio.ts +56 -0
- package/@types/BackgroundFill.ts +18 -0
- package/@types/BackgroundFillFreeformGradient.ts +16 -0
- package/@types/BackgroundFillGradient.ts +26 -0
- package/@types/BackgroundFillSolid.ts +16 -0
- package/@types/BackgroundType.ts +21 -0
- package/@types/BackgroundTypeChatTheme.ts +16 -0
- package/@types/BackgroundTypeFill.ts +23 -0
- package/@types/BackgroundTypePattern.ts +40 -0
- package/@types/BackgroundTypeWallpaper.ts +33 -0
- package/@types/Birthdate.ts +21 -0
- package/@types/BotCommand.ts +16 -0
- package/@types/BotCommandScope.ts +30 -0
- package/@types/BotCommandScopeAllChatAdministrators.ts +11 -0
- package/@types/BotCommandScopeAllGroupChats.ts +11 -0
- package/@types/BotCommandScopeAllPrivateChats.ts +11 -0
- package/@types/BotCommandScopeChat.ts +16 -0
- package/@types/BotCommandScopeChatAdministrators.ts +16 -0
- package/@types/BotCommandScopeChatMember.ts +21 -0
- package/@types/BotCommandScopeDefault.ts +12 -0
- package/@types/BotDescription.ts +11 -0
- package/@types/BotName.ts +11 -0
- package/@types/BotShortDescription.ts +11 -0
- package/@types/BusinessBotRights.ts +65 -0
- package/@types/BusinessConnection.ts +41 -0
- package/@types/BusinessIntro.ts +23 -0
- package/@types/BusinessLocation.ts +18 -0
- package/@types/BusinessMessagesDeleted.ts +24 -0
- package/@types/BusinessOpeningHours.ts +18 -0
- package/@types/BusinessOpeningHoursInterval.ts +18 -0
- package/@types/CallbackGame.ts +6 -0
- package/@types/CallbackQuery.ts +49 -0
- package/@types/Chat.ts +43 -0
- package/@types/ChatAdministratorRights.ts +84 -0
- package/@types/ChatBackground.ts +13 -0
- package/@types/ChatBoost.ts +29 -0
- package/@types/ChatBoostAdded.ts +11 -0
- package/@types/ChatBoostRemoved.ts +28 -0
- package/@types/ChatBoostSource.ts +18 -0
- package/@types/ChatBoostSourceGiftCode.ts +19 -0
- package/@types/ChatBoostSourceGiveaway.ts +35 -0
- package/@types/ChatBoostSourcePremium.ts +19 -0
- package/@types/ChatBoostUpdated.ts +18 -0
- package/@types/ChatFullInfo.ts +260 -0
- package/@types/ChatInviteLink.ts +66 -0
- package/@types/ChatJoinRequest.ts +42 -0
- package/@types/ChatLocation.ts +16 -0
- package/@types/ChatMember.ts +28 -0
- package/@types/ChatMemberAdministrator.ts +107 -0
- package/@types/ChatMemberBanned.ts +23 -0
- package/@types/ChatMemberLeft.ts +18 -0
- package/@types/ChatMemberMember.ts +23 -0
- package/@types/ChatMemberOwner.ts +28 -0
- package/@types/ChatMemberRestricted.ts +99 -0
- package/@types/ChatMemberUpdated.ts +49 -0
- package/@types/ChatPermissions.ts +78 -0
- package/@types/ChatPhoto.ts +30 -0
- package/@types/ChatShared.ts +36 -0
- package/@types/Checklist.ts +33 -0
- package/@types/ChecklistTask.ts +33 -0
- package/@types/ChecklistTasksAdded.ts +19 -0
- package/@types/ChecklistTasksDone.ts +24 -0
- package/@types/ChosenInlineResult.ts +34 -0
- package/@types/Contact.ts +33 -0
- package/@types/CopyTextButton.ts +11 -0
- package/@types/Dice.ts +17 -0
- package/@types/DirectMessagePriceChanged.ts +17 -0
- package/@types/Document.ts +41 -0
- package/@types/EncryptedCredentials.ts +23 -0
- package/@types/EncryptedPassportElement.ts +357 -0
- package/@types/ExternalReplyInfo.ts +159 -0
- package/@types/File.ts +33 -0
- package/@types/ForceReply.ts +26 -0
- package/@types/ForumTopic.ts +26 -0
- package/@types/ForumTopicClosed.ts +6 -0
- package/@types/ForumTopicCreated.ts +21 -0
- package/@types/ForumTopicEdited.ts +17 -0
- package/@types/ForumTopicReopened.ts +6 -0
- package/@types/Game.ts +41 -0
- package/@types/GameHighScore.ts +23 -0
- package/@types/GeneralForumTopicHidden.ts +7 -0
- package/@types/GeneralForumTopicUnhidden.ts +7 -0
- package/@types/Gift.ts +38 -0
- package/@types/GiftInfo.ts +52 -0
- package/@types/Gifts.ts +13 -0
- package/@types/Giveaway.ts +55 -0
- package/@types/GiveawayCompleted.ts +29 -0
- package/@types/GiveawayCreated.ts +11 -0
- package/@types/GiveawayWinners.ts +68 -0
- package/@types/InaccessibleMessage.ts +23 -0
- package/@types/InlineKeyboardButton.ts +88 -0
- package/@types/InlineKeyboardMarkup.ts +13 -0
- package/@types/InlineQuery.ts +41 -0
- package/@types/InlineQueryResult.ts +70 -0
- package/@types/InlineQueryResultArticle.ts +58 -0
- package/@types/InlineQueryResultAudio.ts +69 -0
- package/@types/InlineQueryResultCachedAudio.ts +55 -0
- package/@types/InlineQueryResultCachedDocument.ts +65 -0
- package/@types/InlineQueryResultCachedGif.ts +65 -0
- package/@types/InlineQueryResultCachedMpeg4Gif.ts +65 -0
- package/@types/InlineQueryResultCachedPhoto.ts +70 -0
- package/@types/InlineQueryResultCachedSticker.ts +34 -0
- package/@types/InlineQueryResultCachedVideo.ts +70 -0
- package/@types/InlineQueryResultCachedVoice.ts +60 -0
- package/@types/InlineQueryResultContact.ts +64 -0
- package/@types/InlineQueryResultDocument.ts +85 -0
- package/@types/InlineQueryResultGame.ts +29 -0
- package/@types/InlineQueryResultGif.ts +91 -0
- package/@types/InlineQueryResultLocation.ts +82 -0
- package/@types/InlineQueryResultMpeg4Gif.ts +91 -0
- package/@types/InlineQueryResultPhoto.ts +84 -0
- package/@types/InlineQueryResultVenue.ts +80 -0
- package/@types/InlineQueryResultVideo.ts +98 -0
- package/@types/InlineQueryResultVoice.ts +65 -0
- package/@types/InlineQueryResultsButton.ts +34 -0
- package/@types/InputChecklist.ts +39 -0
- package/@types/InputChecklistTask.ts +30 -0
- package/@types/InputContactMessageContent.ts +27 -0
- package/@types/InputFile.ts +10 -0
- package/@types/InputInvoiceMessageContent.ts +120 -0
- package/@types/InputLocationMessageContent.ts +39 -0
- package/@types/InputMedia.ts +24 -0
- package/@types/InputMediaAnimation.ts +68 -0
- package/@types/InputMediaAudio.ts +58 -0
- package/@types/InputMediaDocument.ts +49 -0
- package/@types/InputMediaPhoto.ts +45 -0
- package/@types/InputMediaVideo.ts +85 -0
- package/@types/InputMessageContent.ts +25 -0
- package/@types/InputPaidMedia.ts +11 -0
- package/@types/InputPaidMediaPhoto.ts +21 -0
- package/@types/InputPaidMediaVideo.ts +64 -0
- package/@types/InputPollOption.ts +25 -0
- package/@types/InputProfilePhoto.ts +10 -0
- package/@types/InputProfilePhotoAnimated.ts +23 -0
- package/@types/InputProfilePhotoStatic.ts +18 -0
- package/@types/InputSticker.ts +38 -0
- package/@types/InputStoryContent.ts +11 -0
- package/@types/InputStoryContentPhoto.ts +29 -0
- package/@types/InputStoryContentVideo.ts +49 -0
- package/@types/InputTextMessageContent.ts +28 -0
- package/@types/InputVenueMessageContent.ts +47 -0
- package/@types/Invoice.ts +35 -0
- package/@types/KeyboardButton.ts +61 -0
- package/@types/KeyboardButtonPollType.ts +13 -0
- package/@types/KeyboardButtonRequestChat.ts +68 -0
- package/@types/KeyboardButtonRequestUsers.ts +45 -0
- package/@types/LabeledPrice.ts +18 -0
- package/@types/LinkPreviewOptions.ts +32 -0
- package/@types/Location.ts +38 -0
- package/@types/LocationAddress.ts +26 -0
- package/@types/LoginUrl.ts +37 -0
- package/@types/MaskPosition.ts +28 -0
- package/@types/MaybeInaccessibleMessage.ts +8 -0
- package/@types/MenuButton.ts +20 -0
- package/@types/MenuButtonCommands.ts +11 -0
- package/@types/MenuButtonDefault.ts +11 -0
- package/@types/MenuButtonWebApp.ts +26 -0
- package/@types/Message.ts +608 -0
- package/@types/MessageAutoDeleteTimerChanged.ts +11 -0
- package/@types/MessageEntity.ts +109 -0
- package/@types/MessageId.ts +11 -0
- package/@types/MessageOrigin.ts +21 -0
- package/@types/MessageOriginChannel.ts +33 -0
- package/@types/MessageOriginChat.ts +28 -0
- package/@types/MessageOriginHiddenUser.ts +21 -0
- package/@types/MessageOriginUser.ts +23 -0
- package/@types/MessageReactionCountUpdated.ts +28 -0
- package/@types/MessageReactionUpdated.ts +43 -0
- package/@types/OrderInfo.ts +28 -0
- package/@types/OwnedGift.ts +11 -0
- package/@types/OwnedGiftRegular.ts +77 -0
- package/@types/OwnedGiftUnique.ts +57 -0
- package/@types/OwnedGifts.ts +23 -0
- package/@types/PaidMedia.ts +13 -0
- package/@types/PaidMediaInfo.ts +18 -0
- package/@types/PaidMediaPhoto.ts +18 -0
- package/@types/PaidMediaPreview.ts +26 -0
- package/@types/PaidMediaPurchased.ts +18 -0
- package/@types/PaidMediaVideo.ts +18 -0
- package/@types/PaidMessagePriceChanged.ts +16 -0
- package/@types/PassportData.ts +18 -0
- package/@types/PassportElementError.ts +37 -0
- package/@types/PassportElementErrorDataField.ts +39 -0
- package/@types/PassportElementErrorFile.ts +33 -0
- package/@types/PassportElementErrorFiles.ts +33 -0
- package/@types/PassportElementErrorFrontSide.ts +28 -0
- package/@types/PassportElementErrorReverseSide.ts +27 -0
- package/@types/PassportElementErrorSelfie.ts +28 -0
- package/@types/PassportElementErrorTranslationFile.ts +38 -0
- package/@types/PassportElementErrorTranslationFiles.ts +38 -0
- package/@types/PassportElementErrorUnspecified.ts +49 -0
- package/@types/PassportFile.ts +28 -0
- package/@types/PhotoSize.ts +32 -0
- package/@types/Poll.ts +81 -0
- package/@types/PollAnswer.ts +28 -0
- package/@types/PollOption.ts +24 -0
- package/@types/PreCheckoutQuery.ts +45 -0
- package/@types/ProximityAlertTriggered.ts +24 -0
- package/@types/ReactionCount.ts +18 -0
- package/@types/ReactionType.ts +18 -0
- package/@types/ReactionTypeCustomEmoji.ts +16 -0
- package/@types/ReactionTypeEmoji.ts +92 -0
- package/@types/ReactionTypePaid.ts +11 -0
- package/@types/RefundedPayment.ts +35 -0
- package/@types/ReplyKeyboardMarkup.ts +49 -0
- package/@types/ReplyKeyboardRemove.ts +25 -0
- package/@types/ReplyParameters.ts +48 -0
- package/@types/ResponseParameters.ts +19 -0
- package/@types/RevenueWithdrawalState.ts +13 -0
- package/@types/RevenueWithdrawalStateFailed.ts +11 -0
- package/@types/RevenueWithdrawalStatePending.ts +10 -0
- package/@types/RevenueWithdrawalStateSucceeded.ts +21 -0
- package/@types/SentWebAppMessage.ts +12 -0
- package/@types/SharedUser.ts +36 -0
- package/@types/ShippingAddress.ts +36 -0
- package/@types/ShippingOption.ts +23 -0
- package/@types/ShippingQuery.ts +28 -0
- package/@types/StarAmount.ts +17 -0
- package/@types/StarTransaction.ts +42 -0
- package/@types/StarTransactions.ts +13 -0
- package/@types/Sticker.ts +86 -0
- package/@types/StickerSet.ts +33 -0
- package/@types/Story.ts +18 -0
- package/@types/StoryArea.ts +18 -0
- package/@types/StoryAreaPosition.ts +36 -0
- package/@types/StoryAreaType.ts +24 -0
- package/@types/StoryAreaTypeLink.ts +16 -0
- package/@types/StoryAreaTypeLocation.ts +28 -0
- package/@types/StoryAreaTypeSuggestedReaction.ts +29 -0
- package/@types/StoryAreaTypeUniqueGift.ts +16 -0
- package/@types/StoryAreaTypeWeather.ts +26 -0
- package/@types/SuccessfulPayment.ts +60 -0
- package/@types/SwitchInlineQueryChosenChat.ts +33 -0
- package/@types/TextQuote.ts +30 -0
- package/@types/TransactionPartner.ts +31 -0
- package/@types/TransactionPartnerAffiliateProgram.ts +24 -0
- package/@types/TransactionPartnerChat.ts +21 -0
- package/@types/TransactionPartnerFragment.ts +18 -0
- package/@types/TransactionPartnerOther.ts +11 -0
- package/@types/TransactionPartnerTelegramAds.ts +11 -0
- package/@types/TransactionPartnerTelegramApi.ts +16 -0
- package/@types/TransactionPartnerUser.ts +70 -0
- package/@types/UniqueGift.ts +38 -0
- package/@types/UniqueGiftBackdrop.ts +23 -0
- package/@types/UniqueGiftBackdropColors.ts +26 -0
- package/@types/UniqueGiftInfo.ts +42 -0
- package/@types/UniqueGiftModel.ts +23 -0
- package/@types/UniqueGiftSymbol.ts +23 -0
- package/@types/Update.ts +177 -0
- package/@types/User.ts +74 -0
- package/@types/UserProfilePhotos.ts +18 -0
- package/@types/UsersShared.ts +19 -0
- package/@types/Venue.ts +48 -0
- package/@types/Video.ts +66 -0
- package/@types/VideoChatEnded.ts +11 -0
- package/@types/VideoChatParticipantsInvited.ts +13 -0
- package/@types/VideoChatScheduled.ts +11 -0
- package/@types/VideoChatStarted.ts +6 -0
- package/@types/VideoNote.ts +39 -0
- package/@types/Voice.ts +34 -0
- package/@types/WebAppData.ts +17 -0
- package/@types/WebAppInfo.ts +11 -0
- package/@types/WebhookInfo.ts +54 -0
- package/@types/WriteAccessAllowed.ts +23 -0
- package/@types/index.ts +395 -0
- package/@types/utils.ts +17 -0
- package/biome.json +58 -0
- package/bun.lock +105 -0
- package/cron/actions-server.ts +87 -0
- package/index.ts +9 -0
- package/nyx-client.ts +133 -0
- package/package.json +22 -0
- package/tsconfig.json +28 -0
- package/types.d.ts +35 -0
- package/utils/actions.ts +30 -0
- package/utils/api.ts +27 -0
- package/utils/enum.ts +5 -0
- package/utils/helpers.ts +71 -0
- package/utils/methods.ts +1943 -0
- package/utils/objects.ts +37 -0
- package/utils/table.ts +72 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## InputContactMessageContent
|
|
3
|
+
* Represents the content of a contact message to be sent as the result of an inline query.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#inputcontactmessagecontent
|
|
5
|
+
*/
|
|
6
|
+
export type InputContactMessageContent = {
|
|
7
|
+
/**
|
|
8
|
+
* Contact's phone number
|
|
9
|
+
*/
|
|
10
|
+
phone_number: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Contact's first name
|
|
14
|
+
*/
|
|
15
|
+
first_name: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Optional. Contact's last name
|
|
19
|
+
*/
|
|
20
|
+
last_name?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard),
|
|
24
|
+
* 0-2048 bytes
|
|
25
|
+
*/
|
|
26
|
+
vcard?: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReadStream } from "node:fs";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ##
|
|
5
|
+
* InputFile
|
|
6
|
+
* This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual
|
|
7
|
+
* way that files are uploaded via the browser.
|
|
8
|
+
* @see https://core.telegram.org/bots/api#inputfile
|
|
9
|
+
*/
|
|
10
|
+
export type InputFile = ReadStream | Buffer | File;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Currencies, LabeledPrice } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputInvoiceMessageContent
|
|
5
|
+
* Represents the content of an invoice message to be sent as the result of an inline query.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputinvoicemessagecontent
|
|
7
|
+
*/
|
|
8
|
+
export type InputInvoiceMessageContent = {
|
|
9
|
+
/**
|
|
10
|
+
* Product name, 1-32 characters
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Product description, 1-255 characters
|
|
16
|
+
*/
|
|
17
|
+
description: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal
|
|
21
|
+
* processes.
|
|
22
|
+
*/
|
|
23
|
+
payload: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
|
|
27
|
+
*/
|
|
28
|
+
provider_token: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
|
|
32
|
+
*/
|
|
33
|
+
currency: Currencies | "XTR";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery
|
|
37
|
+
* tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
|
|
38
|
+
*/
|
|
39
|
+
prices: LabeledPrice[]; //TODO: JSON
|
|
40
|
+
/**
|
|
41
|
+
* Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double).
|
|
42
|
+
* For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json,
|
|
43
|
+
* it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
|
|
44
|
+
* Defaults to 0. Not supported for payments in [Telegram Stars](https://t.me/BotNews/90).
|
|
45
|
+
*/
|
|
46
|
+
max_tip_amount?: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not
|
|
50
|
+
* float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed
|
|
51
|
+
* in a strictly increased order and must not exceed max_tip_amount.
|
|
52
|
+
*/
|
|
53
|
+
suggested_tip_amounts?: number[]; //TODO: JSON
|
|
54
|
+
/**
|
|
55
|
+
* Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider.
|
|
56
|
+
* A detailed description of the required fields should be provided by the payment provider.
|
|
57
|
+
*/
|
|
58
|
+
provider_data?: string; //TODO: JSON
|
|
59
|
+
/**
|
|
60
|
+
* Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
|
|
61
|
+
*/
|
|
62
|
+
photo_url?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Optional. Photo size in bytes
|
|
66
|
+
*/
|
|
67
|
+
photo_size?: number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Optional. Photo width
|
|
71
|
+
*/
|
|
72
|
+
photo_width?: number;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Optional. Photo height
|
|
76
|
+
*/
|
|
77
|
+
photo_height?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in
|
|
81
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
82
|
+
*/
|
|
83
|
+
need_name?: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in
|
|
87
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
88
|
+
*/
|
|
89
|
+
need_phone_number?: boolean;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in
|
|
93
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
94
|
+
*/
|
|
95
|
+
need_email?: boolean;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in
|
|
99
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
100
|
+
*/
|
|
101
|
+
need_shipping_address?: boolean;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in
|
|
105
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
106
|
+
*/
|
|
107
|
+
send_phone_number_to_provider?: boolean;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in
|
|
111
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
112
|
+
*/
|
|
113
|
+
send_email_to_provider?: boolean;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Optional. Pass True if the final price depends on the shipping method. Ignored for payments in
|
|
117
|
+
* [Telegram Stars](https://t.me/BotNews/90).
|
|
118
|
+
*/
|
|
119
|
+
is_flexible?: boolean;
|
|
120
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## InputLocationMessageContent
|
|
3
|
+
* Represents the content of a location message to be sent as the result of an inline query.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#inputlocationmessagecontent
|
|
5
|
+
*/
|
|
6
|
+
export type InputLocationMessageContent = {
|
|
7
|
+
/**
|
|
8
|
+
* Latitude of the location in degrees
|
|
9
|
+
*/
|
|
10
|
+
latitude: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Longitude of the location in degrees
|
|
14
|
+
*/
|
|
15
|
+
longitude: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Optional. The radius of uncertainty for the location, measured in meters; 0-1500
|
|
19
|
+
*/
|
|
20
|
+
horizontal_accuracy?: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF
|
|
24
|
+
* for live locations that can be edited indefinitely.
|
|
25
|
+
*/
|
|
26
|
+
live_period?: number;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if
|
|
30
|
+
* specified.
|
|
31
|
+
*/
|
|
32
|
+
heading?: number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in
|
|
36
|
+
* meters. Must be between 1 and 100000 if specified.
|
|
37
|
+
*/
|
|
38
|
+
proximity_alert_radius?: number;
|
|
39
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InputMediaAnimation,
|
|
3
|
+
InputMediaAudio,
|
|
4
|
+
InputMediaDocument,
|
|
5
|
+
InputMediaPhoto,
|
|
6
|
+
InputMediaVideo,
|
|
7
|
+
} from "./";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* ## InputMedia
|
|
11
|
+
* This object represents the content of a media message to be sent. It should be one of
|
|
12
|
+
* - InputMediaAnimation
|
|
13
|
+
* - InputMediaDocument
|
|
14
|
+
* - InputMediaAudio
|
|
15
|
+
* - InputMediaPhoto
|
|
16
|
+
* - InputMediaVideo
|
|
17
|
+
* @see https://core.telegram.org/bots/api#inputmedia
|
|
18
|
+
*/
|
|
19
|
+
export type InputMedia =
|
|
20
|
+
| InputMediaAnimation
|
|
21
|
+
| InputMediaDocument
|
|
22
|
+
| InputMediaAudio
|
|
23
|
+
| InputMediaPhoto
|
|
24
|
+
| InputMediaVideo;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Attachment, InputFile, MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputMediaAnimation
|
|
5
|
+
* Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputmediaanimation
|
|
7
|
+
*/
|
|
8
|
+
export type InputMediaAnimation = {
|
|
9
|
+
/**
|
|
10
|
+
* Type of the result, must be animation
|
|
11
|
+
*/
|
|
12
|
+
type: "animation";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL
|
|
16
|
+
* for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
17
|
+
* multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
18
|
+
*/
|
|
19
|
+
media: string | Attachment;
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
|
|
22
|
+
* The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not
|
|
23
|
+
* exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
|
|
24
|
+
* only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using
|
|
25
|
+
* multipart/form-data under <file_attach_name>. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
26
|
+
*/
|
|
27
|
+
thumbnail?: InputFile | string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing
|
|
31
|
+
*/
|
|
32
|
+
caption?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Optional. Mode for parsing entities in the animation caption. See formatting options for more details.
|
|
36
|
+
*/
|
|
37
|
+
parse_mode?: ParseMode;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
41
|
+
*/
|
|
42
|
+
caption_entities?: MessageEntity[];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
46
|
+
*/
|
|
47
|
+
show_caption_above_media?: boolean;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Optional. Animation width
|
|
51
|
+
*/
|
|
52
|
+
width?: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Optional. Animation height
|
|
56
|
+
*/
|
|
57
|
+
height?: number;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Optional. Animation duration in seconds
|
|
61
|
+
*/
|
|
62
|
+
duration?: number;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Optional. Pass True if the animation needs to be covered with a spoiler animation
|
|
66
|
+
*/
|
|
67
|
+
has_spoiler?: boolean;
|
|
68
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Attachment, InputFile, MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputMediaAudio
|
|
5
|
+
* Represents an audio file to be treated as music to be sent.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputmediaaudio
|
|
7
|
+
*/
|
|
8
|
+
export type InputMediaAudio = {
|
|
9
|
+
/**
|
|
10
|
+
* Type of the result, must be audio
|
|
11
|
+
*/
|
|
12
|
+
type: "audio";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for
|
|
16
|
+
* Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
17
|
+
* multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
18
|
+
*/
|
|
19
|
+
media: string | Attachment;
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
|
|
22
|
+
* The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not
|
|
23
|
+
* exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
|
|
24
|
+
* only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using
|
|
25
|
+
* multipart/form-data under <file_attach_name>. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
26
|
+
*/
|
|
27
|
+
thumbnail?: InputFile | string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
|
|
31
|
+
*/
|
|
32
|
+
caption?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
|
|
36
|
+
*/
|
|
37
|
+
parse_mode?: ParseMode;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
41
|
+
*/
|
|
42
|
+
caption_entities?: MessageEntity[];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Optional. Duration of the audio in seconds
|
|
46
|
+
*/
|
|
47
|
+
duration?: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Optional. Performer of the audio
|
|
51
|
+
*/
|
|
52
|
+
performer?: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Optional. Title of the audio
|
|
56
|
+
*/
|
|
57
|
+
title?: string;
|
|
58
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Attachment, InputFile, MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputMediaDocument
|
|
5
|
+
* Represents a general file to be sent.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputmediadocument
|
|
7
|
+
*/
|
|
8
|
+
export type InputMediaDocument = {
|
|
9
|
+
/**
|
|
10
|
+
* Type of the result, must be document
|
|
11
|
+
*/
|
|
12
|
+
type: "document";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for
|
|
16
|
+
* Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
17
|
+
* multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
18
|
+
*/
|
|
19
|
+
media: string | Attachment;
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
|
|
22
|
+
* The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not
|
|
23
|
+
* exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
|
|
24
|
+
* only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using
|
|
25
|
+
* multipart/form-data under <file_attach_name>. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
26
|
+
*/
|
|
27
|
+
thumbnail?: InputFile | string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
|
|
31
|
+
*/
|
|
32
|
+
caption?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Optional. Mode for parsing entities in the document caption. See formatting options for more details.
|
|
36
|
+
*/
|
|
37
|
+
parse_mode?: ParseMode;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
41
|
+
*/
|
|
42
|
+
caption_entities?: MessageEntity[];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data.
|
|
46
|
+
* Always True, if the document is sent as part of an album.
|
|
47
|
+
*/
|
|
48
|
+
disable_content_type_detection?: boolean;
|
|
49
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Attachment, MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputMediaPhoto
|
|
5
|
+
* Represents a photo to be sent.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputmediaphoto
|
|
7
|
+
*/
|
|
8
|
+
export type InputMediaPhoto = {
|
|
9
|
+
/**
|
|
10
|
+
* Type of the result, must be photo
|
|
11
|
+
*/
|
|
12
|
+
type: "photo";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL
|
|
16
|
+
* for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
17
|
+
* multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
18
|
+
*/
|
|
19
|
+
media: string | Attachment;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
|
|
23
|
+
*/
|
|
24
|
+
caption?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
|
|
28
|
+
*/
|
|
29
|
+
parse_mode?: ParseMode;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
33
|
+
*/
|
|
34
|
+
caption_entities?: MessageEntity[];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
38
|
+
*/
|
|
39
|
+
show_caption_above_media?: boolean;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional. Pass True if the photo needs to be covered with a spoiler animation
|
|
43
|
+
*/
|
|
44
|
+
has_spoiler?: boolean;
|
|
45
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Attachment, InputFile, MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputMediaVideo
|
|
5
|
+
* Represents a video to be sent.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputmediavideo
|
|
7
|
+
*/
|
|
8
|
+
export type InputMediaVideo = {
|
|
9
|
+
/**
|
|
10
|
+
* Type of the result, must be video
|
|
11
|
+
*/
|
|
12
|
+
type: "video";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL
|
|
16
|
+
* for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
17
|
+
* multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
18
|
+
*/
|
|
19
|
+
media: string | Attachment;
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
|
|
22
|
+
* The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not
|
|
23
|
+
* exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
|
|
24
|
+
* only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using
|
|
25
|
+
* multipart/form-data under <file_attach_name>. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
26
|
+
*/
|
|
27
|
+
thumbnail?: InputFile | string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers
|
|
31
|
+
* (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>”
|
|
32
|
+
* to upload a new one using multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
33
|
+
*/
|
|
34
|
+
cover?: InputFile | string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Optional. Start timestamp for the video in the message
|
|
38
|
+
*/
|
|
39
|
+
start_timestamp?: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
|
|
43
|
+
*/
|
|
44
|
+
caption?: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Optional. Mode for parsing entities in the video caption. See formatting options for more details.
|
|
48
|
+
*/
|
|
49
|
+
parse_mode?: ParseMode;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
53
|
+
*/
|
|
54
|
+
caption_entities?: MessageEntity[];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
58
|
+
*/
|
|
59
|
+
show_caption_above_media?: boolean;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Optional. Video width
|
|
63
|
+
*/
|
|
64
|
+
width?: number;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Optional. Video height
|
|
68
|
+
*/
|
|
69
|
+
height?: number;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Optional. Video duration in seconds
|
|
73
|
+
*/
|
|
74
|
+
duration?: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Optional. Pass True if the uploaded video is suitable for streaming
|
|
78
|
+
*/
|
|
79
|
+
supports_streaming?: boolean;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Optional. Pass True if the video needs to be covered with a spoiler animation
|
|
83
|
+
*/
|
|
84
|
+
has_spoiler?: boolean;
|
|
85
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InputContactMessageContent,
|
|
3
|
+
InputInvoiceMessageContent,
|
|
4
|
+
InputLocationMessageContent,
|
|
5
|
+
InputTextMessageContent,
|
|
6
|
+
InputVenueMessageContent,
|
|
7
|
+
} from "./";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* ## InputMessageContent
|
|
11
|
+
* This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently
|
|
12
|
+
* support the following 5 types:
|
|
13
|
+
* - InputTextMessageContent
|
|
14
|
+
* - InputLocationMessageContent
|
|
15
|
+
* - InputVenueMessageContent
|
|
16
|
+
* - InputContactMessageContent
|
|
17
|
+
* - InputInvoiceMessageContent
|
|
18
|
+
* @see https://core.telegram.org/bots/api#inputmessagecontent
|
|
19
|
+
*/
|
|
20
|
+
export type InputMessageContent =
|
|
21
|
+
| InputTextMessageContent
|
|
22
|
+
| InputLocationMessageContent
|
|
23
|
+
| InputVenueMessageContent
|
|
24
|
+
| InputContactMessageContent
|
|
25
|
+
| InputInvoiceMessageContent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InputPaidMediaPhoto } from "./InputPaidMediaPhoto";
|
|
2
|
+
import type { InputPaidMediaVideo } from "./InputPaidMediaVideo";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ## InputPaidMedia
|
|
6
|
+
* This object describes the paid media to be sent. Currently, it can be one of
|
|
7
|
+
* - InputPaidMediaPhoto
|
|
8
|
+
* - InputPaidMediaVideo
|
|
9
|
+
* @see https://core.telegram.org/bots/api#inputpaidmedia
|
|
10
|
+
*/
|
|
11
|
+
export type InputPaidMedia = InputPaidMediaPhoto | InputPaidMediaVideo;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Attachment } from "./index";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* InputPaidMediaPhoto
|
|
5
|
+
* The paid media to send is a photo.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputpaidmediaphoto
|
|
7
|
+
*/
|
|
8
|
+
export type InputPaidMediaPhoto = {
|
|
9
|
+
/**
|
|
10
|
+
* Type of the media, must be photo
|
|
11
|
+
*/
|
|
12
|
+
type: "photo";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for
|
|
16
|
+
* Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
17
|
+
* multipart/form-data under <file_attach_name> name.
|
|
18
|
+
* @see https://core.telegram.org/bots/api#sending-files
|
|
19
|
+
*/
|
|
20
|
+
media: string | Attachment;
|
|
21
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { InputFile } from "./InputFile";
|
|
2
|
+
import type { Attachment } from "./index";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* InputPaidMediaVideo
|
|
6
|
+
* The paid media to send is a video.
|
|
7
|
+
* @see https://core.telegram.org/bots/api#inputpaidmediavideo
|
|
8
|
+
*/
|
|
9
|
+
export type InputPaidMediaVideo = {
|
|
10
|
+
/**
|
|
11
|
+
* Type of the media, must be video
|
|
12
|
+
*/
|
|
13
|
+
type: "video";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for
|
|
17
|
+
* Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using
|
|
18
|
+
* multipart/form-data under <file_attach_name> name.
|
|
19
|
+
* @see https://core.telegram.org/bots/api#sending-files
|
|
20
|
+
*/
|
|
21
|
+
media: string | Attachment;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
|
|
25
|
+
* The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not
|
|
26
|
+
* exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
|
|
27
|
+
* only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using
|
|
28
|
+
* multipart/form-data under <file_attach_name>.
|
|
29
|
+
* @see https://core.telegram.org/bots/api#sending-files
|
|
30
|
+
*/
|
|
31
|
+
thumbnail?: InputFile | string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers
|
|
35
|
+
* (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>”
|
|
36
|
+
* to upload a new one using multipart/form-data under <file_attach_name> name. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
|
|
37
|
+
*/
|
|
38
|
+
cover?: InputFile | string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Optional. Start timestamp for the video in the message
|
|
42
|
+
*/
|
|
43
|
+
start_timestamp?: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional. Video width
|
|
47
|
+
*/
|
|
48
|
+
width?: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Optional. Video height
|
|
52
|
+
*/
|
|
53
|
+
height?: number;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Optional. Video duration in seconds
|
|
57
|
+
*/
|
|
58
|
+
duration?: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Optional. Pass True if the uploaded video is suitable for streaming
|
|
62
|
+
*/
|
|
63
|
+
supports_streaming?: boolean;
|
|
64
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputPollOption
|
|
5
|
+
* This object contains information about one answer option in a poll to be sent.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputpolloption
|
|
7
|
+
*/
|
|
8
|
+
export type InputPollOption = {
|
|
9
|
+
/**
|
|
10
|
+
* Option text, 1-100 characters
|
|
11
|
+
*/
|
|
12
|
+
text: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom
|
|
16
|
+
* emoji entities are allowed
|
|
17
|
+
*/
|
|
18
|
+
text_parse_mode?: ParseMode;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified
|
|
22
|
+
* instead of text_parse_mode
|
|
23
|
+
*/
|
|
24
|
+
text_entities?: MessageEntity[];
|
|
25
|
+
};
|