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,91 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InlineKeyboardMarkup,
|
|
3
|
+
InputMessageContent,
|
|
4
|
+
MessageEntity,
|
|
5
|
+
ParseMode,
|
|
6
|
+
} from "./";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## InlineQueryResultGif
|
|
10
|
+
* Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional
|
|
11
|
+
* caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the
|
|
12
|
+
* animation.
|
|
13
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultgif
|
|
14
|
+
*/
|
|
15
|
+
export type InlineQueryResultGif = {
|
|
16
|
+
/**
|
|
17
|
+
* Type of the result, must be gif
|
|
18
|
+
*/
|
|
19
|
+
type: "gif";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for this result, 1-64 bytes
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A valid URL for the GIF file. File size must not exceed 1MB
|
|
28
|
+
*/
|
|
29
|
+
gif_url: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Optional. Width of the GIF
|
|
33
|
+
*/
|
|
34
|
+
gif_width?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Optional. Height of the GIF
|
|
38
|
+
*/
|
|
39
|
+
gif_height?: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional. Duration of the GIF in seconds
|
|
43
|
+
*/
|
|
44
|
+
gif_duration?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
|
|
48
|
+
*/
|
|
49
|
+
thumbnail_url: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to
|
|
53
|
+
* “image/jpeg”
|
|
54
|
+
*/
|
|
55
|
+
thumbnail_mime_type: "image/jpeg" | "image/gif" | "video/mp4";
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Optional. Title for the result
|
|
59
|
+
*/
|
|
60
|
+
title?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
|
|
64
|
+
*/
|
|
65
|
+
caption?: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Optional. Mode for parsing entities in the caption. See formatting options for more details.
|
|
69
|
+
*/
|
|
70
|
+
parse_mode?: ParseMode;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
74
|
+
*/
|
|
75
|
+
caption_entities?: MessageEntity[];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
79
|
+
*/
|
|
80
|
+
show_caption_above_media?: boolean;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Optional. Inline keyboard attached to the message
|
|
84
|
+
*/
|
|
85
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Optional. Content of the message to be sent instead of the GIF animation
|
|
89
|
+
*/
|
|
90
|
+
input_message_content?: InputMessageContent;
|
|
91
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { InlineKeyboardMarkup, InputMessageContent } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InlineQueryResultLocation
|
|
5
|
+
* Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use
|
|
6
|
+
* input_message_content to send a message with the specified content instead of the location.
|
|
7
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultlocation
|
|
8
|
+
*/
|
|
9
|
+
export type InlineQueryResultLocation = {
|
|
10
|
+
/**
|
|
11
|
+
* Type of the result, must be location
|
|
12
|
+
*/
|
|
13
|
+
type: "location";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for this result, 1-64 Bytes
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Location latitude in degrees
|
|
22
|
+
*/
|
|
23
|
+
latitude: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Location longitude in degrees
|
|
27
|
+
*/
|
|
28
|
+
longitude: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Location title
|
|
32
|
+
*/
|
|
33
|
+
title: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional. The radius of uncertainty for the location, measured in meters; 0-1500
|
|
37
|
+
*/
|
|
38
|
+
horizontal_accuracy?: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF
|
|
42
|
+
* for live locations that can be edited indefinitely.
|
|
43
|
+
*/
|
|
44
|
+
live_period?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if
|
|
48
|
+
* specified.
|
|
49
|
+
*/
|
|
50
|
+
heading?: number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in
|
|
54
|
+
* meters. Must be between 1 and 100000 if specified.
|
|
55
|
+
*/
|
|
56
|
+
proximity_alert_radius?: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* ptional. Inline keyboard attached to the message
|
|
60
|
+
*/
|
|
61
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Optional. Content of the message to be sent instead of the location
|
|
65
|
+
*/
|
|
66
|
+
input_message_content?: InputMessageContent;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Optional. Url of the thumbnail for the result
|
|
70
|
+
*/
|
|
71
|
+
thumbnail_url?: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Optional. Thumbnail width
|
|
75
|
+
*/
|
|
76
|
+
thumbnail_width?: number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Optional. Thumbnail height
|
|
80
|
+
*/
|
|
81
|
+
thumbnail_height?: number;
|
|
82
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InlineKeyboardMarkup,
|
|
3
|
+
InputMessageContent,
|
|
4
|
+
MessageEntity,
|
|
5
|
+
ParseMode,
|
|
6
|
+
} from "./";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## InlineQueryResultMpeg4Gif
|
|
10
|
+
* Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file
|
|
11
|
+
* will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message
|
|
12
|
+
* with the specified content instead of the animation.
|
|
13
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
|
|
14
|
+
*/
|
|
15
|
+
export type InlineQueryResultMpeg4Gif = {
|
|
16
|
+
/**
|
|
17
|
+
* Type of the result, must be mpeg4_gif
|
|
18
|
+
*/
|
|
19
|
+
type: "mpeg4_gif";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for this result, 1-64 bytes
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A valid URL for the MPEG4 file. File size must not exceed 1MB
|
|
28
|
+
*/
|
|
29
|
+
mpeg4_url: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Optional. Video width
|
|
33
|
+
*/
|
|
34
|
+
mpeg4_width?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Optional. Video height
|
|
38
|
+
*/
|
|
39
|
+
mpeg4_height?: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional. Video duration in seconds
|
|
43
|
+
*/
|
|
44
|
+
mpeg4_duration?: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
|
|
48
|
+
*/
|
|
49
|
+
thumbnail_url: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to
|
|
53
|
+
* “image/jpeg”
|
|
54
|
+
*/
|
|
55
|
+
thumbnail_mime_type: "image/jpeg" | "image/gif" | "video/mp4";
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Optional. Title for the result
|
|
59
|
+
*/
|
|
60
|
+
title?: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
|
|
64
|
+
*/
|
|
65
|
+
caption?: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Optional. Mode for parsing entities in the caption. See formatting options for more details.
|
|
69
|
+
*/
|
|
70
|
+
parse_mode?: ParseMode;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
74
|
+
*/
|
|
75
|
+
caption_entities?: MessageEntity[];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
79
|
+
*/
|
|
80
|
+
show_caption_above_media?: boolean;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Optional. Inline keyboard attached to the message
|
|
84
|
+
*/
|
|
85
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Optional. Content of the message to be sent instead of the video animation
|
|
89
|
+
*/
|
|
90
|
+
input_message_content?: InputMessageContent;
|
|
91
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InlineKeyboardMarkup,
|
|
3
|
+
InputMessageContent,
|
|
4
|
+
MessageEntity,
|
|
5
|
+
ParseMode,
|
|
6
|
+
} from "./";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## InlineQueryResultPhoto
|
|
10
|
+
* Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively,
|
|
11
|
+
* you can use input_message_content to send a message with the specified content instead of the photo.
|
|
12
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultphoto
|
|
13
|
+
*/
|
|
14
|
+
export type InlineQueryResultPhoto = {
|
|
15
|
+
/**
|
|
16
|
+
* Type of the result, must be photo
|
|
17
|
+
*/
|
|
18
|
+
type: "photo";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier for this result, 1-64 bytes
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
|
|
27
|
+
*/
|
|
28
|
+
photo_url: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* URL of the thumbnail for the photo
|
|
32
|
+
*/
|
|
33
|
+
thumbnail_url: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional. Width of the photo
|
|
37
|
+
*/
|
|
38
|
+
photo_width?: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Optional. Height of the photo
|
|
42
|
+
*/
|
|
43
|
+
photo_height?: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional. Title for the result
|
|
47
|
+
*/
|
|
48
|
+
title?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Optional. Short description of the result
|
|
52
|
+
*/
|
|
53
|
+
description?: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
|
|
57
|
+
*/
|
|
58
|
+
caption?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
|
|
62
|
+
*/
|
|
63
|
+
parse_mode?: ParseMode;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
67
|
+
*/
|
|
68
|
+
caption_entities?: MessageEntity[];
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
72
|
+
*/
|
|
73
|
+
show_caption_above_media?: boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Optional. Inline keyboard attached to the message
|
|
77
|
+
*/
|
|
78
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Optional. Content of the message to be sent instead of the photo
|
|
82
|
+
*/
|
|
83
|
+
input_message_content?: InputMessageContent;
|
|
84
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { InlineKeyboardMarkup, InputMessageContent } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InlineQueryResultVenue
|
|
5
|
+
* Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content
|
|
6
|
+
* to send a message with the specified content instead of the venue.
|
|
7
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultvenue
|
|
8
|
+
*/
|
|
9
|
+
export type InlineQueryResultVenue = {
|
|
10
|
+
/**
|
|
11
|
+
* Type of the result, must be venue
|
|
12
|
+
*/
|
|
13
|
+
type: "venue";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for this result, 1-64 Bytes
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Latitude of the venue location in degrees
|
|
22
|
+
*/
|
|
23
|
+
latitude: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Longitude of the venue location in degrees
|
|
27
|
+
*/
|
|
28
|
+
longitude: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Title of the venue
|
|
32
|
+
*/
|
|
33
|
+
title: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Address of the venue
|
|
37
|
+
*/
|
|
38
|
+
address: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Optional. Foursquare identifier of the venue if known
|
|
42
|
+
*/
|
|
43
|
+
foursquare_id?: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”,
|
|
47
|
+
* “arts_entertainment/aquarium” or “food/icecream”.)
|
|
48
|
+
*/
|
|
49
|
+
foursquare_type?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional. Google Places type of the venue. (See supported types.)
|
|
53
|
+
*/
|
|
54
|
+
google_place_type?: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Optional. Inline keyboard attached to the message
|
|
58
|
+
*/
|
|
59
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Optional. Content of the message to be sent instead of the venue
|
|
63
|
+
*/
|
|
64
|
+
input_message_content?: InputMessageContent;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Optional. Url of the thumbnail for the result
|
|
68
|
+
*/
|
|
69
|
+
thumbnail_url?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Optional. Thumbnail width
|
|
73
|
+
*/
|
|
74
|
+
thumbnail_width?: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Optional. Thumbnail height
|
|
78
|
+
*/
|
|
79
|
+
thumbnail_height?: number;
|
|
80
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InlineKeyboardMarkup,
|
|
3
|
+
InputMessageContent,
|
|
4
|
+
MessageEntity,
|
|
5
|
+
ParseMode,
|
|
6
|
+
} from "./";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## InlineQueryResultVideo
|
|
10
|
+
* Represents a link to a page containing an embedded video player or a video file. By default, this video file will be
|
|
11
|
+
* sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with
|
|
12
|
+
* the specified content instead of the video.
|
|
13
|
+
* > If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using
|
|
14
|
+
* > input_message_content.
|
|
15
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultvideo
|
|
16
|
+
*/
|
|
17
|
+
export type InlineQueryResultVideo = {
|
|
18
|
+
/**
|
|
19
|
+
* Type of the result, must be video
|
|
20
|
+
*/
|
|
21
|
+
type: "video";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier for this result, 1-64 bytes
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A valid URL for the embedded video player or video file
|
|
30
|
+
*/
|
|
31
|
+
video_url: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* MIME type of the content of the video URL, “text/html” or “video/mp4”
|
|
35
|
+
*/
|
|
36
|
+
mime_type: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* URL of the thumbnail (JPEG only) for the video
|
|
40
|
+
*/
|
|
41
|
+
thumbnail_url: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Title for the result
|
|
45
|
+
*/
|
|
46
|
+
title: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
|
|
50
|
+
*/
|
|
51
|
+
caption?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Optional. Mode for parsing entities in the video caption. See formatting options for more details.
|
|
55
|
+
*/
|
|
56
|
+
parse_mode?: ParseMode;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
60
|
+
*/
|
|
61
|
+
caption_entities?: MessageEntity[];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Optional. Pass True, if the caption must be shown above the message media
|
|
65
|
+
*/
|
|
66
|
+
show_caption_above_media?: boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Optional. Video width
|
|
70
|
+
*/
|
|
71
|
+
video_width?: number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Optional. Video height
|
|
75
|
+
*/
|
|
76
|
+
video_height?: number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Optional. Video duration in seconds
|
|
80
|
+
*/
|
|
81
|
+
video_duration?: number;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Optional. Short description of the result
|
|
85
|
+
*/
|
|
86
|
+
description?: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Optional. Inline keyboard attached to the message
|
|
90
|
+
*/
|
|
91
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo
|
|
95
|
+
* is used to send an HTML-page as a result (e.g., a YouTube video).
|
|
96
|
+
*/
|
|
97
|
+
input_message_content?: InputMessageContent;
|
|
98
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InlineKeyboardMarkup,
|
|
3
|
+
InputMessageContent,
|
|
4
|
+
MessageEntity,
|
|
5
|
+
ParseMode,
|
|
6
|
+
} from "./";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ## InlineQueryResultVoice
|
|
10
|
+
* Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will
|
|
11
|
+
* be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content
|
|
12
|
+
* instead of the the voice message.
|
|
13
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultvoice
|
|
14
|
+
*/
|
|
15
|
+
export type InlineQueryResultVoice = {
|
|
16
|
+
/**
|
|
17
|
+
* Type of the result, must be voice
|
|
18
|
+
*/
|
|
19
|
+
type: "voice";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for this result, 1-64 bytes
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A valid URL for the voice recording
|
|
28
|
+
*/
|
|
29
|
+
voice_url: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Recording title
|
|
33
|
+
*/
|
|
34
|
+
title: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Optional. Caption, 0-1024 characters after entities parsing
|
|
38
|
+
*/
|
|
39
|
+
caption?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
|
|
43
|
+
*/
|
|
44
|
+
parse_mode?: ParseMode;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
|
|
48
|
+
*/
|
|
49
|
+
caption_entities?: MessageEntity[];
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Optional. Recording duration in seconds
|
|
53
|
+
*/
|
|
54
|
+
voice_duration?: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Optional. Inline keyboard attached to the message
|
|
58
|
+
*/
|
|
59
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Optional. Content of the message to be sent instead of the voice recording
|
|
63
|
+
*/
|
|
64
|
+
input_message_content?: InputMessageContent;
|
|
65
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AtMostOne } from "../utils";
|
|
2
|
+
import type { WebAppInfo } from "./";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ## InlineQueryResultsButton
|
|
6
|
+
* This object represents a button to be shown above inline query results. You must use exactly one of the optional
|
|
7
|
+
* fields.
|
|
8
|
+
* @see https://core.telegram.org/bots/api#inlinequeryresultsbutton
|
|
9
|
+
*/
|
|
10
|
+
export type InlineQueryResultsButton = {
|
|
11
|
+
/**
|
|
12
|
+
* Label text on the button
|
|
13
|
+
*/
|
|
14
|
+
text: string;
|
|
15
|
+
} & AtMostOne<{
|
|
16
|
+
/**
|
|
17
|
+
* Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be
|
|
18
|
+
* able to switch back to the inline mode using the method switchInlineQuery inside the Web App.
|
|
19
|
+
*/
|
|
20
|
+
web_app: WebAppInfo;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button.
|
|
24
|
+
* 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
|
|
25
|
+
*
|
|
26
|
+
* Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to
|
|
27
|
+
* adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the
|
|
28
|
+
* results, or even before showing any. The user presses the button, switches to a private chat with the bot and,
|
|
29
|
+
* in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer
|
|
30
|
+
* a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline
|
|
31
|
+
* capabilities.
|
|
32
|
+
*/
|
|
33
|
+
start_parameter: string;
|
|
34
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { InputChecklistTask, MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputChecklist
|
|
5
|
+
* Describes a checklist to create.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputchecklist
|
|
7
|
+
*/
|
|
8
|
+
export type InputChecklist = {
|
|
9
|
+
/**
|
|
10
|
+
* Title of the checklist; 1-255 characters after entities parsing
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Optional. Mode for parsing entities in the title. See formatting options for more details.
|
|
16
|
+
*/
|
|
17
|
+
parse_mode?: ParseMode;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Optional. List of special entities that appear in the title, which can be specified instead of parse_mode.
|
|
21
|
+
* Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
|
|
22
|
+
*/
|
|
23
|
+
title_entities?: MessageEntity[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List of 1-30 tasks in the checklist
|
|
27
|
+
*/
|
|
28
|
+
tasks: InputChecklistTask[];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Optional. Pass True if other users can add tasks to the checklist
|
|
32
|
+
*/
|
|
33
|
+
others_can_add_tasks?: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional. Pass True if other users can mark tasks as done or not done in the checklist
|
|
37
|
+
*/
|
|
38
|
+
others_can_mark_tasks_as_done?: boolean;
|
|
39
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MessageEntity, ParseMode } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## InputChecklistTask
|
|
5
|
+
* Describes a task to add to a checklist.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#inputchecklisttask
|
|
7
|
+
*/
|
|
8
|
+
export type InputChecklistTask = {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier of the task; must be positive and unique among all task identifiers currently present in the
|
|
11
|
+
* checklist
|
|
12
|
+
*/
|
|
13
|
+
id: number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Text of the task; 1-100 characters after entities parsing
|
|
17
|
+
*/
|
|
18
|
+
text: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Mode for parsing entities in the text. See formatting options for more details.
|
|
22
|
+
*/
|
|
23
|
+
parse_mode?: ParseMode;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. List of special entities that appear in the text, which can be specified instead of parse_mode.
|
|
27
|
+
* Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.
|
|
28
|
+
*/
|
|
29
|
+
text_entities?: MessageEntity[];
|
|
30
|
+
};
|