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,99 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChatMemberRestricted
|
|
5
|
+
* Represents a chat member that is under certain restrictions in the chat. Supergroups only.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#chatmemberrestricted
|
|
7
|
+
*/
|
|
8
|
+
export type ChatMemberRestricted = {
|
|
9
|
+
/**
|
|
10
|
+
* The member's status in the chat, always “restricted”
|
|
11
|
+
*/
|
|
12
|
+
status: "restricted";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Information about the user
|
|
16
|
+
*/
|
|
17
|
+
user: User;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* True, if the user is a member of the chat at the moment of the request
|
|
21
|
+
*/
|
|
22
|
+
is_member: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and
|
|
26
|
+
* venues
|
|
27
|
+
*/
|
|
28
|
+
can_send_messages: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* True, if the user is allowed to send audios
|
|
32
|
+
*/
|
|
33
|
+
can_send_audios: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* True, if the user is allowed to send documents
|
|
37
|
+
*/
|
|
38
|
+
can_send_documents: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* True, if the user is allowed to send photos
|
|
42
|
+
*/
|
|
43
|
+
can_send_photos: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* True, if the user is allowed to send videos
|
|
47
|
+
*/
|
|
48
|
+
can_send_videos: boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* True, if the user is allowed to send video notes
|
|
52
|
+
*/
|
|
53
|
+
can_send_video_notes: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* True, if the user is allowed to send voice notes
|
|
57
|
+
*/
|
|
58
|
+
can_send_voice_notes: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* True, if the user is allowed to send polls
|
|
62
|
+
*/
|
|
63
|
+
can_send_polls: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* True, if the user is allowed to send animations, games, stickers and use inline bots
|
|
67
|
+
*/
|
|
68
|
+
can_send_other_messages: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* True, if the user is allowed to add web page previews to their messages
|
|
72
|
+
*/
|
|
73
|
+
can_add_web_page_previews: boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* True, if the user is allowed to change the chat title, photo and other settings
|
|
77
|
+
*/
|
|
78
|
+
can_change_info: boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* True, if the user is allowed to invite new users to the chat
|
|
82
|
+
*/
|
|
83
|
+
can_invite_users: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* True, if the user is allowed to pin messages
|
|
87
|
+
*/
|
|
88
|
+
can_pin_messages: boolean;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* True, if the user is allowed to create forum topics
|
|
92
|
+
*/
|
|
93
|
+
can_manage_topics: boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever
|
|
97
|
+
*/
|
|
98
|
+
until_date: number;
|
|
99
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Chat, ChatInviteLink, ChatMember, User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChatMemberUpdated
|
|
5
|
+
* This object represents changes in the status of a chat member.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#chatmemberupdated
|
|
7
|
+
*/
|
|
8
|
+
export type ChatMemberUpdated = {
|
|
9
|
+
/**
|
|
10
|
+
* Chat the user belongs to
|
|
11
|
+
*/
|
|
12
|
+
chat: Chat;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Performer of the action, which resulted in the change
|
|
16
|
+
*/
|
|
17
|
+
from: User;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Date the change was done in Unix time
|
|
21
|
+
*/
|
|
22
|
+
date: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Previous information about the chat member
|
|
26
|
+
*/
|
|
27
|
+
old_chat_member: ChatMember;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* New information about the chat member
|
|
31
|
+
*/
|
|
32
|
+
new_chat_member: ChatMember;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.
|
|
36
|
+
*/
|
|
37
|
+
invite_link?: ChatInviteLink;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional. True, if the user joined the chat after sending a direct join request without using an invite link and
|
|
41
|
+
* being approved by an administrator
|
|
42
|
+
*/
|
|
43
|
+
via_join_request?: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional. True, if the user joined the chat via a chat folder invite link
|
|
47
|
+
*/
|
|
48
|
+
via_chat_folder_invite_link?: boolean;
|
|
49
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ChatPermissions
|
|
3
|
+
* Describes actions that a non-administrator user is allowed to take in a chat.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#chatpermissions
|
|
5
|
+
*/
|
|
6
|
+
export type ChatPermissions = {
|
|
7
|
+
/**
|
|
8
|
+
* Optional. True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices,
|
|
9
|
+
* locations and venues
|
|
10
|
+
*/
|
|
11
|
+
can_send_messages?: boolean;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Optional. True, if the user is allowed to send audios
|
|
15
|
+
*/
|
|
16
|
+
can_send_audios?: boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Optional. True, if the user is allowed to send documents
|
|
20
|
+
*/
|
|
21
|
+
can_send_documents?: boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Optional. True, if the user is allowed to send photos
|
|
25
|
+
*/
|
|
26
|
+
can_send_photos?: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Optional. True, if the user is allowed to send videos
|
|
30
|
+
*/
|
|
31
|
+
can_send_videos?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Optional. True, if the user is allowed to send video notes
|
|
35
|
+
*/
|
|
36
|
+
can_send_video_notes?: boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Optional. True, if the user is allowed to send voice notes
|
|
40
|
+
*/
|
|
41
|
+
can_send_voice_notes?: boolean;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Optional. True, if the user is allowed to send polls
|
|
45
|
+
*/
|
|
46
|
+
can_send_polls?: boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
|
|
50
|
+
*/
|
|
51
|
+
can_send_other_messages?: boolean;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Optional. True, if the user is allowed to add web page previews to their messages
|
|
55
|
+
*/
|
|
56
|
+
can_add_web_page_previews?: boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public
|
|
60
|
+
* supergroups
|
|
61
|
+
*/
|
|
62
|
+
can_change_info?: boolean;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Optional. True, if the user is allowed to invite new users to the chat
|
|
66
|
+
*/
|
|
67
|
+
can_invite_users?: boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
|
|
71
|
+
*/
|
|
72
|
+
can_pin_messages?: boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages
|
|
76
|
+
*/
|
|
77
|
+
can_manage_topics?: boolean;
|
|
78
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ChatPhoto
|
|
3
|
+
* This object represents a chat photo.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#chatphoto
|
|
5
|
+
*/
|
|
6
|
+
export type ChatPhoto = {
|
|
7
|
+
/**
|
|
8
|
+
* File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as
|
|
9
|
+
* long as the photo is not changed.
|
|
10
|
+
*/
|
|
11
|
+
small_file_id: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different
|
|
15
|
+
* bots. Can't be used to download or reuse the file.
|
|
16
|
+
*/
|
|
17
|
+
small_file_unique_id: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long
|
|
21
|
+
* as the photo is not changed.
|
|
22
|
+
*/
|
|
23
|
+
big_file_id: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different
|
|
27
|
+
* bots. Can't be used to download or reuse the file.
|
|
28
|
+
*/
|
|
29
|
+
big_file_unique_id: string;
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PhotoSize } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChatShared
|
|
5
|
+
* This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#chatshared
|
|
7
|
+
*/
|
|
8
|
+
export type ChatShared = {
|
|
9
|
+
/**
|
|
10
|
+
* Identifier of the request
|
|
11
|
+
*/
|
|
12
|
+
request_id: number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages
|
|
16
|
+
* may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer
|
|
17
|
+
* or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and
|
|
18
|
+
* could be unable to use this identifier, unless the chat is already known to the bot by some other means.
|
|
19
|
+
*/
|
|
20
|
+
chat_id: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional. Title of the chat, if the title was requested by the bot.
|
|
24
|
+
*/
|
|
25
|
+
title?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Optional. Username of the chat, if the username was requested by the bot and available.
|
|
29
|
+
*/
|
|
30
|
+
username?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Optional. Available sizes of the chat photo, if the photo was requested by the bot
|
|
34
|
+
*/
|
|
35
|
+
photo?: PhotoSize[];
|
|
36
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ChecklistTask, MessageEntity } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## Checklist
|
|
5
|
+
* Describes a checklist.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#checklist
|
|
7
|
+
*/
|
|
8
|
+
export type Checklist = {
|
|
9
|
+
/**
|
|
10
|
+
* Title of the checklist
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Optional. Special entities that appear in the checklist title
|
|
16
|
+
*/
|
|
17
|
+
title_entities?: MessageEntity[];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* List of tasks in the checklist
|
|
21
|
+
*/
|
|
22
|
+
tasks: ChecklistTask[];
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Optional. True, if users other than the creator of the list can add tasks to the list
|
|
26
|
+
*/
|
|
27
|
+
others_can_add_tasks?: true;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. True, if users other than the creator of the list can mark tasks as done or not done
|
|
31
|
+
*/
|
|
32
|
+
others_can_mark_tasks_as_done?: true;
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MessageEntity, User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChecklistTask
|
|
5
|
+
* Describes a task in a checklist.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#checklisttask
|
|
7
|
+
*/
|
|
8
|
+
export type ChecklistTask = {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier of the task
|
|
11
|
+
*/
|
|
12
|
+
id: number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Text of the task
|
|
16
|
+
*/
|
|
17
|
+
text: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Optional. Special entities that appear in the task text
|
|
21
|
+
*/
|
|
22
|
+
text_entities?: MessageEntity[];
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Optional. User that completed the task; omitted if the task wasn't completed
|
|
26
|
+
*/
|
|
27
|
+
completed_by_user?: User;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed
|
|
31
|
+
*/
|
|
32
|
+
completion_date?: number;
|
|
33
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ChecklistTask, Message } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChecklistTasksAdded
|
|
5
|
+
* Describes a service message about tasks added to a checklist.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#checklisttasksadded
|
|
7
|
+
*/
|
|
8
|
+
export type ChecklistTasksAdded = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this
|
|
11
|
+
* field will not contain the reply_to_message field even if it itself is a reply.
|
|
12
|
+
*/
|
|
13
|
+
checklist_message?: Message;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* List of tasks added to the checklist
|
|
17
|
+
*/
|
|
18
|
+
tasks: ChecklistTask[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Message } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChecklistTasksDone
|
|
5
|
+
* Describes a service message about checklist tasks marked as done or not done.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#checklisttasksdone
|
|
7
|
+
*/
|
|
8
|
+
export type ChecklistTasksDone = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message
|
|
11
|
+
* object in this field will not contain the reply_to_message field even if it itself is a reply.
|
|
12
|
+
*/
|
|
13
|
+
checklist_message?: Message;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Optional. Identifiers of the tasks that were marked as done
|
|
17
|
+
*/
|
|
18
|
+
marked_as_done_task_ids?: number[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Identifiers of the tasks that were marked as not done
|
|
22
|
+
*/
|
|
23
|
+
marked_as_not_done_task_ids?: number[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChosenInlineResult
|
|
5
|
+
* Represents a result of an inline query that was chosen by the user and sent to their chat partner.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#choseninlineresult
|
|
7
|
+
*/
|
|
8
|
+
export type ChosenInlineResult = {
|
|
9
|
+
/**
|
|
10
|
+
* The unique identifier for the result that was chosen
|
|
11
|
+
*/
|
|
12
|
+
result_id: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The user that chose the result
|
|
16
|
+
*/
|
|
17
|
+
from: User;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Optional. Sender location, only for bots that require user location
|
|
21
|
+
*/
|
|
22
|
+
location?: Location;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the
|
|
26
|
+
* message. Will be also received in callback queries and can be used to edit the message.
|
|
27
|
+
*/
|
|
28
|
+
inline_message_id?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The query that was used to obtain the result
|
|
32
|
+
*/
|
|
33
|
+
query: string;
|
|
34
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## Contact
|
|
3
|
+
* This object represents a phone contact.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#contact
|
|
5
|
+
*/
|
|
6
|
+
export type Contact = {
|
|
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. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some
|
|
24
|
+
* programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant
|
|
25
|
+
* bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
|
|
26
|
+
*/
|
|
27
|
+
user_id?: number;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard)
|
|
31
|
+
*/
|
|
32
|
+
vcard?: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## CopyTextButton
|
|
3
|
+
* This object represents an inline keyboard button that copies specified text to the clipboard.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#copytextbutton
|
|
5
|
+
*/
|
|
6
|
+
export type CopyTextButton = {
|
|
7
|
+
/**
|
|
8
|
+
* The text to be copied to the clipboard; 1-256 characters
|
|
9
|
+
*/
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
package/@types/Dice.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## Dice
|
|
3
|
+
* This object represents an animated emoji that displays a random value.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#dice
|
|
5
|
+
*/
|
|
6
|
+
export type Dice = {
|
|
7
|
+
/**
|
|
8
|
+
* Emoji on which the dice throw animation is based
|
|
9
|
+
*/
|
|
10
|
+
emoji: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji,
|
|
14
|
+
* 1-64 for “🎰” base emoji
|
|
15
|
+
*/
|
|
16
|
+
value: number;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## DirectMessagePriceChanged
|
|
3
|
+
* Describes a service message about a change in the price of direct messages sent to a channel chat.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#directmessagepricechanged
|
|
5
|
+
*/
|
|
6
|
+
export type DirectMessagePriceChanged = {
|
|
7
|
+
/**
|
|
8
|
+
* True, if direct messages are enabled for the channel chat; false otherwise
|
|
9
|
+
*/
|
|
10
|
+
are_direct_messages_enabled: boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the
|
|
14
|
+
* channel. Does not apply to users who have been exempted by administrators. Defaults to 0.
|
|
15
|
+
*/
|
|
16
|
+
direct_message_star_count?: number;
|
|
17
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PhotoSize } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## Document
|
|
5
|
+
* This object represents a general file (as opposed to photos, voice messages and audio files).
|
|
6
|
+
* @see https://core.telegram.org/bots/api#document
|
|
7
|
+
*/
|
|
8
|
+
export type Document = {
|
|
9
|
+
/**
|
|
10
|
+
* Identifier for this file, which can be used to download or reuse the file
|
|
11
|
+
*/
|
|
12
|
+
file_id: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used
|
|
16
|
+
* to download or reuse the file.
|
|
17
|
+
*/
|
|
18
|
+
file_unique_id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Document thumbnail as defined by the sender
|
|
22
|
+
*/
|
|
23
|
+
thumbnail?: PhotoSize;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Original filename as defined by the sender
|
|
27
|
+
*/
|
|
28
|
+
file_name?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* ptional. MIME type of the file as defined by the sender
|
|
32
|
+
*/
|
|
33
|
+
mime_type?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
|
|
37
|
+
* defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
|
|
38
|
+
* float type are safe for storing this value.
|
|
39
|
+
*/
|
|
40
|
+
file_size?: number;
|
|
41
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## EncryptedCredentials
|
|
3
|
+
* Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport
|
|
4
|
+
* Documentation for a complete description of the data decryption and authentication processes.
|
|
5
|
+
* @see https://core.telegram.org/bots/api#encryptedcredentials
|
|
6
|
+
*/
|
|
7
|
+
export type EncryptedCredentials = {
|
|
8
|
+
/**
|
|
9
|
+
* Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for
|
|
10
|
+
* EncryptedPassportElement decryption and authentication
|
|
11
|
+
*/
|
|
12
|
+
data: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Base64-encoded data hash for data authentication
|
|
16
|
+
*/
|
|
17
|
+
hash: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption
|
|
21
|
+
*/
|
|
22
|
+
secret: string;
|
|
23
|
+
};
|