GramIO API Reference / @gramio/contexts/dist
@gramio/contexts/dist
Enumerations
| Enumeration | Description |
|---|---|
| ChatType | Enum of ChatType property |
| EntityType | Enum of EntityType property |
| PollType | Enum of PollType property |
Classes
| Class | Description |
|---|---|
| AcceptedGiftTypes | This object describes the types of gifts that can be gifted to a user or a chat. |
| AnimationAttachment | This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). |
| Attachment | Simple attachment |
| AudioAttachment | This object represents an audio file to be treated as music by the Telegram clients. |
| BackgroundFillFreeformGradient | The background is a freeform gradient that rotates after every message in the chat. |
| BackgroundFillGradient | The background is a gradient fill. |
| BackgroundFillSolid | The background is filled using the selected color. |
| BackgroundTypeChatTheme | The background is taken directly from a built-in chat theme. |
| BackgroundTypeFill | The background is automatically filled based on the selected colors. |
| BackgroundTypePattern | The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. |
| BackgroundTypeWallpaper | The background is a wallpaper in the JPEG format. |
| Birthdate | Describes the birthdate of a user. |
| BoostAddedContext | This object represents a service message about a forum topic closed in the chat. Currently holds no information. |
| BotCommand | This object represents a bot command |
| BotDescription | This object represents the bot's description. |
| BotShortDescription | This object represents the bot's short description. |
| BusinessBotRights | Represents the rights of a business bot. |
| BusinessConnection | Describes the connection of the bot with a business account. |
| BusinessConnectionContext | This object Describes the connection of the bot with a business account. |
| BusinessIntro | Contains information about the start page settings of a Telegram Business account. |
| BusinessLocation | Contains information about the location of a Telegram Business account. |
| BusinessMessagesDeleted | Describes the connection of the bot with a business account. |
| BusinessMessagesDeletedContext | This object represents a boost added to a chat or changed. |
| BusinessOpeningHours | Documentation |
| BusinessOpeningHoursInterval | Describes an interval of time during which a business is open. |
| CallbackGame | A placeholder, currently holds no information. |
| CallbackQuery | This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present. |
| CallbackQueryContext | Called when callback_query event occurs |
| Chat | This object represents a chat. |
| ChatActionMixin | Main base context |
| ChatAdministratorRights | Represents the rights of an administrator in a chat. |
| ChatBackground | This object represents a chat background. |
| ChatBackgroundSetContext | This object represents a service message about chat background set. |
| ChatBoost | This object contains information about a chat boost. |
| ChatBoostAdded | This object represents a service message about a user boosting a chat. |
| ChatBoostContext | This object represents a boost added to a chat or changed. |
| ChatBoostRemoved | This object represents a boost added to a chat or changed. |
| ChatBoostSourceGiftCode | The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. |
| ChatBoostSourceGiveaway | The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. |
| ChatBoostSourcePremium | The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. |
| ChatBoostUpdated | This object represents a boost added to a chat or changed. |
| ChatControlMixin | This object represents a mixin that is responsible for all the chat management methods |
| ChatFullInfo | This object contains full information about a chat. |
| ChatInviteControlMixin | This object represents a mixin that works with all *ChatInviteLink methods |
| ChatInviteLink | Represents an invite link for a chat. |
| ChatJoinRequest | Represents a join request sent to a chat. |
| ChatJoinRequestContext | Represents a join request sent to a chat. |
| ChatLocation | Represents a location to which a chat is connected. |
| ChatMember | This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported: - ChatMemberOwner - ChatMemberAdministrator - ChatMemberMember - ChatMemberRestricted - ChatMemberLeft - ChatMemberBanned |
| ChatMemberContext | This object represents changes in the status of a chat member. |
| ChatMemberControlMixin | This object represents a mixin that is able to control member's rights |
| ChatMemberUpdated | This object represents changes in the status of a chat member. |
| ChatOwnerChanged | Describes a service message about an ownership change in the chat. |
| ChatOwnerChangedContext | This object represents a service message about an ownership change in the chat. |
| ChatOwnerLeft | Describes a service message about the chat owner leaving the chat. |
| ChatOwnerLeftContext | This object represents a service message about the chat owner leaving the chat. |
| ChatPermissions | Describes actions that a non-administrator user is allowed to take in a chat. |
| ChatPhoto | This object represents a chat photo. |
| ChatSenderControlMixin | This object is a mixin that does all the chat-sender stuff, right? |
| ChatShared | This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. |
| ChatSharedContext | This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. |
| Checklist | Describes a checklist. |
| ChecklistTask | Describes a task in a checklist. |
| ChecklistTasksAdded | Describes a service message about tasks added to a checklist. |
| ChecklistTasksAddedContext | This object represents a service message about checklist tasks added. |
| ChecklistTasksDone | Describes a service message about checklist tasks marked as done or not done. |
| ChecklistTasksDoneContext | This object represents a service message about checklist tasks done. |
| ChosenInlineResult | Represents a result of an inline query that was chosen by the user and sent to their chat partner. |
| ChosenInlineResultContext | The result of an inline query that was chosen by a user and sent to their chat partner |
| CloneMixin | This object represents a mixin which has clone(options?) method |
| Contact | This object represents a phone contact. |
| ContactAttachment | This object represents a phone contact. |
| Context | Main base context |
| DeleteChatPhotoContext | Service message: the chat photo was deleted |
| Dice | This object represents an animated emoji that displays a random value. |
| DirectMessagePriceChanged | Describes a service message about a change in the price of direct messages sent to a channel chat. |
| DirectMessagePriceChangedContext | This object represents a service message about direct message price changed. |
| DirectMessagesTopic | Describes a topic of a direct messages chat. |
| DocumentAttachment | This object represents a general file (as opposed to photos, voice messages and audio files). |
| DownloadMixin | This object represents a mixin that can be used to download media files |
| EncryptedCredentials | Contains data required for decrypting and authenticatin EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. |
| EncryptedPassportElement | Contains information about documents or other Telegram Passport elements shared with the bot by the user. |
| ExternalReplyInfo | This object contains information about a message that is being replied to, which may come from another chat or forum topic. |
| File | This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile. |
| FileAttachment | Attachment with fileId and fileUniqueId properties |
| ForumMixin | This object represents a mixin that's used in all topic-related updates |
| ForumTopicClosed | This object represents a service message about a forum topic closed in the chat. Currently holds no information. |
| ForumTopicClosedContext | This object represents a service message about a forum topic closed in the chat. Currently holds no information. |
| ForumTopicCreated | This object represents a service message about a new forum topic created in the chat. |
| ForumTopicCreatedContext | This object represents a service message about a new forum topic created in the chat. |
| ForumTopicEdited | This object represents a service message about an edited forum topic. |
| ForumTopicEditedContext | This object represents a service message about an edited forum topic. |
| ForumTopicReopened | This object represents a service message about an edited forum topic. |
| ForumTopicReopenedContext | This object represents a service message about a forum topic reopened in the chat. Currently holds no information. |
| Game | This object represents a game. |
| GeneralForumTopicHidden | This object represents a service message about General forum topic hidden in the chat. Currently holds no information. |
| GeneralForumTopicHiddenContext | This object represents a service message about General forum topic hidden in the chat. Currently holds no information. |
| GeneralForumTopicUnhidden | This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. |
| GeneralForumTopicUnhiddenContext | This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. |
| Gift | Describes a service message about a regular gift that was sent or received. |
| GiftBackground | This object describes the background of a gift. |
| GiftContext | This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. |
| GiftInfo | Describes a service message about a regular gift that was sent or received. |
| GiftUpgradeSentContext | This object represents a service message about an upgrade of a gift that was purchased after the gift was sent. |
| Giveaway | This object represents a message about a scheduled giveaway. |
| GiveawayCompleted | This object represents a service message about the completion of a giveaway without public winners. |
| GiveawayCompletedContext | This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. |
| GiveawayCreated | This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. |
| GiveawayCreatedContext | This object represents a service message about the creation of a scheduled giveaway. |
| GiveawayWinners | This object represents a message about the completion of a giveaway with public winners. |
| GiveawayWinnersContext | This object represents a message about the completion of a giveaway with public winners. |
| GroupChatCreatedContext | service message: the group has been created |
| InaccessibleMessage | This object describes a message that was deleted or is otherwise inaccessible to the bot. |
| InlineKeyboardButton | This object represents one button of an inline keyboard. You must use exactly one of the optional fields. |
| InlineKeyboardMarkup | This object represents an inline keyboard that appears right next to the message it belongs to. |
| InlineQuery | This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. |
| InlineQueryContext | This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. |
| InlineQueryResultLocation | Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location. |
| InputChecklist | Describes a checklist to create. |
| InputChecklistTask | Describes a task to add to a checklist. |
| InputLocationMessageContent | Represents the content of a location message to be sent as the result of an inline query. |
| InputPollOption | This object contains information about one answer option in a poll to send. |
| Invoice | This object contains basic information about an invoice. |
| InvoiceContext | Message is an invoice for a payment, information about the invoice. More about payments » |
| LeftChatMemberContext | A member was removed from the group, information about them (this member may be the bot itself) |
| LinkPreviewOptions | Describes the options used for link preview generation. |
| Location | This object represents a point on the map. |
| LocationAttachment | This object represents a point on the map. |
| LocationContext | This object represents a point on the map. |
| LoginUrl | This object represents a parameter of the inline keyboard button used to automatically authorize a user. |
| MaskPosition | This object describes the position on faces where a mask should be placed by default. |
| MenuButton | This object describes the bot's menu button in a private chat. |
| Message | This object represents a message. |
| MessageAutoDeleteTimerChanged | This object represents a service message about a change in auto-delete timer settings |
| MessageAutoDeleteTimerChangedContext | This object represents a service message about a change in auto-delete timer settings. |
| MessageContext | Called when message event occurs |
| MessageEntity | This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. |
| MessageId | This object represents a unique message identifier. |
| MessageOriginChannel | The message was originally sent to a channel chat. |
| MessageOriginChat | The message was originally sent on behalf of a chat to a group chat. |
| MessageOriginHiddenUser | The message was originally sent by an unknown user. |
| MessageOriginUser | The message was originally sent by a known user. |
| MessageReactionContext | This object represents a change of a reaction on a message performed by a user. |
| MessageReactionCountContext | This object represents reaction changes on a message with anonymous reactions. |
| MessageReactionCountUpdated | This object represents reaction changes on a message with anonymous reactions. |
| MessageReactionUpdated | This object represents a change of a reaction on a message performed by a user. |
| MigrateFromChatIdContext | The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. |
| MigrateToChatIdContext | The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. |
| NewChatMembersContext | New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) |
| NewChatPhotoContext | A chat photo was change to this value |
| NewChatTitleContext | A chat title was changed to this value |
| NodeMixin | This object represents a mixin which has id field and can invoke id-dependent methods |
| OrderInfo | This object represents information about an order. |
| PaidMediaInfo | Describes the paid media added to a message. |
| PaidMediaPhoto | The paid media is a photo. |
| PaidMediaPreview | The paid media isn't available before the payment. |
| PaidMediaPurchasedContext | This object contains information about a paid media purchase. |
| PaidMediaVideo | The paid media is a video. |
| PaidMessagePriceChangedContext | Describes a service message about a change in the price of paid messages within a chat. |
| PassportData | Contains information about Telegram Passport data shared with the bot by the user. |
| PassportDataContext | Describes Telegram Passport data shared with the bot by the user. |
| PassportFile | This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. |
| PhotoAttachment | This object represents a photo file with it's sizes |
| PhotoSize | This object represents one size of a photo or a file / sticker thumbnail |
| PinnedMessageContext | Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. |
| PinsMixin | This object represents a mixin that ensures you have methods to pin/unpin messages in the chat |
| Poll | This object contains information about a poll. |
| PollAnswer | This object represents an answer of a user in a non-anonymous poll. |
| PollAnswerContext | This object represents an answer of a user in a non-anonymous poll. |
| PollAttachment | This object contains information about a poll. |
| PollContext | This object contains information about a poll. |
| PollOption | This object contains information about one answer option in a poll. |
| PreCheckoutQuery | This object contains information about an incoming pre-checkout query. |
| PreCheckoutQueryContext | This object contains information about an incoming pre-checkout query. |
| ProximityAlertTriggered | This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. |
| ProximityAlertTriggeredContext | This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. |
| ReactionCount | Represents a reaction added to a message along with the number of times it was added. |
| ReactionTypeCustomEmoji | The reaction is based on a custom emoji. |
| ReactionTypeEmoji | The reaction is based on an emoji. |
| ReactionTypePaid | The reaction is paid. |
| RefundedPayment | This object contains basic information about a refunded payment. |
| RefundedPaymentContext | This object contains basic information about a successful payment. |
| RemovedChatBoostContext | This object represents a boost removed from a chat. |
| SendMixin | This object represents a mixin which can invoke chatId/senderId-dependent methods |
| SentWebAppMessage | Contains information about an inline message sent by a Web App on behalf of a user. |
| SharedUser | This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button. |
| ShippingAddress | This object represents a shipping address. |
| ShippingQuery | This object contains information about an incoming shipping query. |
| ShippingQueryContext | This object contains information about an incoming shipping query. |
| StickerAttachment | This object represents a sticker. |
| StickerSet | This object represents a sticker set. |
| Story | This object represents a story. |
| StoryAttachment | This object represents a story. |
| SuccessfulPayment | This object contains basic information about a successful payment. |
| SuccessfulPaymentContext | This object contains basic information about a successful payment. |
| SuggestedPostApprovalFailed | Describes a service message about the failed approval of a suggested post. |
| SuggestedPostApprovalFailedContext | This object represents a service message about the failed approval of a suggested post. |
| SuggestedPostApproved | Describes a service message about the approval of a suggested post. |
| SuggestedPostApprovedContext | This object represents a service message about the approval of a suggested post. |
| SuggestedPostDeclined | Describes a service message about the rejection of a suggested post. |
| SuggestedPostDeclinedContext | This object represents a service message about the rejection of a suggested post. |
| SuggestedPostInfo | Contains information about a suggested post. |
| SuggestedPostPaid | Describes a service message about a successful payment for a suggested post. |
| SuggestedPostPaidContext | This object represents a service message about a successful payment for a suggested post. |
| SuggestedPostPrice | Describes price of a suggested post. |
| SuggestedPostRefunded | Describes a service message about a payment refund for a suggested post. |
| SuggestedPostRefundedContext | This object represents a service message about a payment refund for a suggested post. |
| TargetMixin | This object represents a mixin which has sender data (e.g. senderId, from etc.) |
| TextQuote | This object contains information about the quoted part of a message that is replied to by the given message. |
| UniqueGift | This object describes a unique gift that was upgraded from a regular gift. |
| UniqueGiftBackdrop | This object describes the colors of the backdrop of a unique gift. |
| UniqueGiftBackdropColors | Describes a service message about a regular gift that was sent or received. |
| UniqueGiftColors | This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. |
| UniqueGiftContext | This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. |
| UniqueGiftInfo | Describes a service message about a unique gift that was sent or received. |
| UniqueGiftModel | Describes a service message about a regular gift that was sent or received. |
| UniqueGiftSymbol | Describes a service message about a regular gift that was sent or received. |
| Update | This object represents an incoming update. |
| User | This object represents a Telegram user or bot. |
| UserProfileAudios | This object represents the audios displayed on a user's profile. |
| UserProfilePhotos | This object represent a user's profile pictures. |
| UserRating | This object describes the rating of a user based on their Telegram Star spendings. |
| UsersShared | This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button. |
| UsersSharedContext | This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. |
| Venue | This object represents a venue. |
| VenueAttachment | This object represents a venue. |
| VideoAttachment | This object represents a video file. |
| VideoChatEnded | This object represents a service message about a video chat ended in the chat. |
| VideoChatEndedContext | This object represents a service message about a video chat ended in the chat. |
| VideoChatParticipantsInvited | This object represents a service message about new members invited to a video chat. |
| VideoChatParticipantsInvitedContext | This object represents a service message about new members invited to a video chat. |
| VideoChatScheduled | This object represents a service message about a video chat scheduled in the chat |
| VideoChatScheduledContext | This object represents a service message about a video chat scheduled in the chat. |
| VideoChatStarted | This object represents a service message about a video chat started in the chat. Currently holds no information. |
| VideoChatStartedContext | This object represents a service message about a video chat started in the chat. |
| VideoNoteAttachment | This object represents a video message. |
| VideoQuality | This object represents a video file of a specific quality. |
| VoiceAttachment | This object represents a voice note. |
| WebAppData | Contains data sent from a Web App to the bot. |
| WebAppDataContext | Describes data sent from a Web App to the bot. |
| WebAppInfo | Contains information about a Web App. |
| WriteAccessAllowed | This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information. |
| WriteAccessAllowedContext | This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. |
Interfaces
| Interface | Description |
|---|---|
| AttachmentsMapping | Mapping attachments type to their structures |
| BotLike | The required object that the contexts are based on |
| DefaultAttachment | Base interface for attachment |
| StreamMessageOptions | Options for SendMixin.streamMessage |
Type Aliases
| Type Alias | Description |
|---|---|
| AttachmentType | Union type of attachments type |
| Constructor | Type helper constructor |
| ContextsMapping | Mapping events to their contexts |
| ContextType | Type util to get type of Context |
| CustomEventName | Custom Event Name |
| GetDerives | - |
| JoinUnion | Type helper to join union type |
| MaybeArray | Type helper to add array and non-array type |
| MessageContextWithRequiredFrom | - |
| MessageDraftPiece | A chunk of text for streaming via sendMessageDraft |
| MessageEventName | Union type of MessageEvent names |
| Optional | Make some keys optional |
| Require | Like Required<T> but for specified keys of T |
| RequireValue | Like Require<O, K> but it sets V as the value for K values |
| SoftString | Permits string but gives hints |
| tSendAnimation | This type represent SendAnimationParams and used by Contexts.MessageContext.sendMedia |
| tSendAudio | This type represent SendAudioParams and used by Contexts.MessageContext.sendMedia |
| tSendDocument | This type represent SendDocumentParams and used by Contexts.MessageContext.sendMedia |
| tSendMethods | This Union type represent a media that can be sended and used by Contexts.MessageContext.sendMedia |
| tSendPhoto | This type represent SendPhotoParams and used by Contexts.MessageContext.sendMedia |
| tSendSticker | This type represent SendStickerParams and used by Contexts.MessageContext.sendMedia |
| tSendVideo | This type represent SendVideoParams and used by Contexts.MessageContext.sendMedia |
| tSendVideoNote | This type represent SendVideoNoteParams and used by Contexts.MessageContext.sendMedia |
| tSendVoice | This type represent SendVoiceParams and used by Contexts.MessageContext.sendMedia |
| UpdateName | Union type of Update names |
Variables
applyMixins()
constapplyMixins: (derivedCtor,baseCtors) =>void
Defined in: contexts/index.d.ts:6701
Helper for construct mixins
Parameters
| Parameter | Type |
|---|---|
derivedCtor | any |
baseCtors | any[] |
Returns
void
backgroundFillMap
constbackgroundFillMap:object
Defined in: contexts/index.d.ts:1023
This object describes the way a background is filled based on the selected colors. Currently, it can be one of
Type Declaration
| Name | Type | Defined in |
|---|---|---|
freeform_gradient | typeof BackgroundFillFreeformGradient | contexts/index.d.ts:1026 |
gradient | typeof BackgroundFillGradient | contexts/index.d.ts:1025 |
solid | typeof BackgroundFillSolid | contexts/index.d.ts:1024 |
backgroundTypeMap
constbackgroundTypeMap:object
Defined in: contexts/index.d.ts:1151
This object describes the type of a background. Currently, it can be one of
Type Declaration
| Name | Type | Defined in |
|---|---|---|
chat_theme | typeof BackgroundTypeChatTheme | contexts/index.d.ts:1155 |
fill | typeof BackgroundTypeFill | contexts/index.d.ts:1152 |
pattern | typeof BackgroundTypePattern | contexts/index.d.ts:1154 |
wallpaper | typeof BackgroundTypeWallpaper | contexts/index.d.ts:1153 |
contextsMappings
constcontextsMappings:object
Defined in: contexts/index.d.ts:6728
Mapping UpdateNames to their contexts
Type Declaration
| Name | Type | Defined in |
|---|---|---|
boost_added | typeof BoostAddedContext | contexts/index.d.ts:6761 |
business_connection | typeof BusinessConnectionContext | contexts/index.d.ts:6748 |
business_message | typeof MessageContext | contexts/index.d.ts:6745 |
callback_query | typeof CallbackQueryContext | contexts/index.d.ts:6729 |
channel_post | typeof MessageContext | contexts/index.d.ts:6742 |
chat_background_set | typeof ChatBackgroundSetContext | contexts/index.d.ts:6762 |
chat_boost | typeof ChatBoostContext | contexts/index.d.ts:6797 |
chat_join_request | typeof ChatJoinRequestContext | contexts/index.d.ts:6730 |
chat_member | typeof ChatMemberContext | contexts/index.d.ts:6731 |
chat_owner_changed | typeof ChatOwnerChangedContext | contexts/index.d.ts:6786 |
chat_owner_left | typeof ChatOwnerLeftContext | contexts/index.d.ts:6785 |
chat_shared | typeof ChatSharedContext | contexts/index.d.ts:6781 |
checklist_tasks_added | typeof ChecklistTasksAddedContext | contexts/index.d.ts:6764 |
checklist_tasks_done | typeof ChecklistTasksDoneContext | contexts/index.d.ts:6763 |
chosen_inline_result | typeof ChosenInlineResultContext | contexts/index.d.ts:6733 |
delete_chat_photo | typeof DeleteChatPhotoContext | contexts/index.d.ts:6734 |
deleted_business_messages | typeof BusinessMessagesDeletedContext | contexts/index.d.ts:6747 |
direct_message_price_changed | typeof DirectMessagePriceChangedContext | contexts/index.d.ts:6765 |
edited_business_message | typeof MessageContext | contexts/index.d.ts:6746 |
edited_channel_post | typeof MessageContext | contexts/index.d.ts:6744 |
edited_message | typeof MessageContext | contexts/index.d.ts:6743 |
forum_topic_closed | typeof ForumTopicClosedContext | contexts/index.d.ts:6773 |
forum_topic_created | typeof ForumTopicCreatedContext | contexts/index.d.ts:6771 |
forum_topic_edited | typeof ForumTopicEditedContext | contexts/index.d.ts:6772 |
forum_topic_reopened | typeof ForumTopicReopenedContext | contexts/index.d.ts:6774 |
general_forum_topic_hidden | typeof GeneralForumTopicHiddenContext | contexts/index.d.ts:6775 |
general_forum_topic_unhidden | typeof GeneralForumTopicUnhiddenContext | contexts/index.d.ts:6776 |
gift | typeof GiftContext | contexts/index.d.ts:6782 |
gift_upgrade_sent | typeof GiftUpgradeSentContext | contexts/index.d.ts:6783 |
giveaway_completed | typeof GiveawayCompletedContext | contexts/index.d.ts:6800 |
giveaway_created | typeof GiveawayCreatedContext | contexts/index.d.ts:6799 |
giveaway_winners | typeof GiveawayWinnersContext | contexts/index.d.ts:6801 |
group_chat_created | typeof GroupChatCreatedContext | contexts/index.d.ts:6735 |
inline_query | typeof InlineQueryContext | contexts/index.d.ts:6736 |
invoice | typeof InvoiceContext | contexts/index.d.ts:6737 |
left_chat_member | typeof LeftChatMemberContext | contexts/index.d.ts:6738 |
location | typeof LocationContext | contexts/index.d.ts:6739 |
message | typeof MessageContext | contexts/index.d.ts:6741 |
message_auto_delete_timer_changed | typeof MessageAutoDeleteTimerChangedContext | contexts/index.d.ts:6740 |
message_reaction | typeof MessageReactionContext | contexts/index.d.ts:6795 |
message_reaction_count | typeof MessageReactionCountContext | contexts/index.d.ts:6796 |
migrate_from_chat_id | typeof MigrateFromChatIdContext | contexts/index.d.ts:6749 |
migrate_to_chat_id | typeof MigrateToChatIdContext | contexts/index.d.ts:6750 |
my_chat_member | typeof ChatMemberContext | contexts/index.d.ts:6732 |
new_chat_members | typeof NewChatMembersContext | contexts/index.d.ts:6751 |
new_chat_photo | typeof NewChatPhotoContext | contexts/index.d.ts:6752 |
new_chat_title | typeof NewChatTitleContext | contexts/index.d.ts:6753 |
paid_message_price_changed | typeof PaidMessagePriceChangedContext | contexts/index.d.ts:6787 |
passport_data | typeof PassportDataContext | contexts/index.d.ts:6754 |
pinned_message | typeof PinnedMessageContext | contexts/index.d.ts:6755 |
poll | typeof PollContext | contexts/index.d.ts:6757 |
poll_answer | typeof PollAnswerContext | contexts/index.d.ts:6756 |
pre_checkout_query | typeof PreCheckoutQueryContext | contexts/index.d.ts:6758 |
proximity_alert_triggered | typeof ProximityAlertTriggeredContext | contexts/index.d.ts:6759 |
purchased_paid_media | typeof PaidMediaPurchasedContext | contexts/index.d.ts:6794 |
refunded_payment | typeof RefundedPaymentContext | contexts/index.d.ts:6779 |
removed_chat_boost | typeof RemovedChatBoostContext | contexts/index.d.ts:6798 |
service_message | typeof MessageContext | contexts/index.d.ts:6793 |
shipping_query | typeof ShippingQueryContext | contexts/index.d.ts:6777 |
successful_payment | typeof SuccessfulPaymentContext | contexts/index.d.ts:6778 |
suggested_post_approval_failed | typeof SuggestedPostApprovalFailedContext | contexts/index.d.ts:6767 |
suggested_post_approved | typeof SuggestedPostApprovedContext | contexts/index.d.ts:6766 |
suggested_post_declined | typeof SuggestedPostDeclinedContext | contexts/index.d.ts:6768 |
suggested_post_paid | typeof SuggestedPostPaidContext | contexts/index.d.ts:6769 |
suggested_post_refunded | typeof SuggestedPostRefundedContext | contexts/index.d.ts:6770 |
unique_gift | typeof UniqueGiftContext | contexts/index.d.ts:6784 |
users_shared | typeof UsersSharedContext | contexts/index.d.ts:6780 |
video_chat_ended | typeof VideoChatEndedContext | contexts/index.d.ts:6788 |
video_chat_participants_invited | typeof VideoChatParticipantsInvitedContext | contexts/index.d.ts:6789 |
video_chat_scheduled | typeof VideoChatScheduledContext | contexts/index.d.ts:6790 |
video_chat_started | typeof VideoChatStartedContext | contexts/index.d.ts:6791 |
web_app_data | typeof WebAppDataContext | contexts/index.d.ts:6792 |
write_access_allowed | typeof WriteAccessAllowedContext | contexts/index.d.ts:6760 |
Example
contextMappings["message"] is MessageContextEVENTS
constEVENTS: [keyofMessage,MessageEventName][]
Defined in: contexts/index.d.ts:6711
Array of EVENTS
filterPayload()
constfilterPayload: (payload) =>Record<string,unknown>
Defined in: contexts/index.d.ts:6705
Helper for filter objects
Parameters
| Parameter | Type |
|---|---|
payload | Record<string, any> |
Returns
Record<string, unknown>
isParsable()
constisParsable: (source) =>boolean
Defined in: contexts/index.d.ts:6707
Guard to check is string can be parsed via JSON.parse
Parameters
| Parameter | Type |
|---|---|
source | string |
Returns
boolean
isPlainObject()
constisPlainObject: (object) =>object is Record<string, any>
Defined in: contexts/index.d.ts:6703
Guard to check is it play object
Parameters
| Parameter | Type |
|---|---|
object | object |
Returns
object is Record<string, any>
paidMediaMap
constpaidMediaMap:object
Defined in: contexts/index.d.ts:4354
This object describes paid media. Currently, it can be one of
Type Declaration
| Name | Type | Defined in |
|---|---|---|
photo | typeof PaidMediaPhoto | contexts/index.d.ts:4357 |
preview | typeof PaidMediaPreview | contexts/index.d.ts:4355 |
video | typeof PaidMediaVideo | contexts/index.d.ts:4356 |
SERVICE_MESSAGE_EVENTS
constSERVICE_MESSAGE_EVENTS:MessageEventName[]
Defined in: contexts/index.d.ts:6709
Array of SERVICE_MESSAGE_EVENTS
Functions
memoizeGetters()
memoizeGetters<
T>(cls,fields):void
Defined in: contexts/index.d.ts:6699
Helper for getters memoization
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
cls | (...args) => T |
fields | keyof T[] |
Returns
void
sleep()
sleep(
ms):Promise<unknown>
Defined in: contexts/index.d.ts:5204
Parameters
| Parameter | Type |
|---|---|
ms | number |
Returns
Promise<unknown>