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. |
| BotAccessSettings | Describes the access settings of a bot. |
| 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 |
| Community | This object represents a community — several supergroups, channels, and bots linked together around a shared topic or audience. |
| CommunityChatAdded | This object represents a service message about a chat being added to a community. |
| CommunityChatAddedContext | This object represents a service message about a chat being added to a community. |
| CommunityChatJoined | A service event describing a chat joining an existing community. |
| CommunityChatJoinedContext | A service message about a chat joining a community. |
| CommunityChatRemoved | This object represents a service message about a chat being removed from a community. Currently holds no information. |
| CommunityChatRemovedContext | This object represents a service message about a chat being removed from a community. Currently holds no information. |
| 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) |
| Link | Represents an HTTP link. |
| LinkPreviewOptions | Describes the options used for link preview generation. |
| LivePhotoAttachment | This object represents a live photo. |
| 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. |
| ManagedBotContext | This object represents a new bot created to be managed by the current bot, or a bot whose token was changed. |
| ManagedBotCreated | This object contains information about the bot that was created to be managed by the current bot. |
| ManagedBotCreatedContext | This object represents a service message about a user creating a bot that will be managed by the current bot. |
| ManagedBotUpdated | This object contains information about the creation or token update of a bot that is managed by the current bot. |
| 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 |
| MessageDraft | A handle to a streaming plain-text message draft — the await using companion to SendMixin.streamMessage's iterable form, mirroring RichMessageDraft. |
| MessageEntity | This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. |
| MessageGenerationStopped | Information about a message draft whose generation was stopped by the user. |
| MessageGenerationStoppedContext | Called when a user stops an in-progress message draft. |
| 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. |
| PaidMediaLivePhoto | The paid media is a live photo. |
| 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. |
| PollMedia | Describes media attached to a poll, poll option, or quiz explanation. |
| PollOption | This object contains information about one answer option in a poll. |
| PollOptionAdded | Describes a service message about an option added to a poll. |
| PollOptionAddedContext | This object represents a service message about an option added to a poll. |
| PollOptionDeleted | Describes a service message about an option deleted from a poll. |
| PollOptionDeletedContext | This object represents a service message about an option deleted from 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. |
| RichMessage | Rich formatted message. |
| RichMessageDraft | A handle to a streaming rich-message draft. |
| SendMixin | This object represents a mixin which can invoke chatId/senderId-dependent methods |
| SentGuestMessage | Describes an inline message sent by a guest bot. |
| 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. |
| SubscriptionContext | This object contains information about changes to a user payment subscription toward the current bot. |
| 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 |
| FileDownload | A lazy, Response-like handle for a file download (returned by bot.downloadFile / context.download). It is a PromiseLike<ArrayBuffer> — so awaiting it yields the bytes — plus readers mirroring the web Response. |
| RichStringLike | A branded value carrying a @gramio/format rich message (Markdown or structured blocks). |
| StreamMessageOptions | Options for SendMixin.streamMessage |
| StreamRichMessageOptions | Options for Contexts.MessageContext.streamRichMessage | streamRichMessage |
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 | - |
| IsAny | Helper to detect if a type is 'any' |
| JoinUnion | Type helper to join union type |
| MaybeArray | Type helper to add array and non-array type |
| MessageContextWithRequiredFrom | - |
| MessageDraftAppend | A piece appendable to a Contexts.MessageContext.streamMessage | message draft handle — text + optional entities (a FormattableString fits). |
| 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 |
| RichChunk | A chunk appendable to a Markdown rich-message draft — a @gramio/format RichString or raw rich-markdown. |
| 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:49
Helper for construct mixins
Parameters
| Parameter | Type |
|---|---|
derivedCtor | any |
baseCtors | any[] |
Returns
void
backgroundFillMap
constbackgroundFillMap:object
Defined in: contexts/index.d.ts:1235
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:1238 |
gradient | typeof BackgroundFillGradient | contexts/index.d.ts:1237 |
solid | typeof BackgroundFillSolid | contexts/index.d.ts:1236 |
backgroundTypeMap
constbackgroundTypeMap:object
Defined in: contexts/index.d.ts:1363
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:1367 |
fill | typeof BackgroundTypeFill | contexts/index.d.ts:1364 |
pattern | typeof BackgroundTypePattern | contexts/index.d.ts:1366 |
wallpaper | typeof BackgroundTypeWallpaper | contexts/index.d.ts:1365 |
contextsMappings
constcontextsMappings:object
Defined in: contexts/index.d.ts:7619
Mapping UpdateNames to their contexts
Type Declaration
| Name | Type | Defined in |
|---|---|---|
boost_added | typeof BoostAddedContext | contexts/index.d.ts:7661 |
business_connection | typeof BusinessConnectionContext | contexts/index.d.ts:7646 |
business_message | typeof MessageContext | contexts/index.d.ts:7642 |
callback_query | typeof CallbackQueryContext | contexts/index.d.ts:7620 |
channel_post | typeof MessageContext | contexts/index.d.ts:7639 |
chat_background_set | typeof ChatBackgroundSetContext | contexts/index.d.ts:7662 |
chat_boost | typeof ChatBoostContext | contexts/index.d.ts:7698 |
chat_join_request | typeof ChatJoinRequestContext | contexts/index.d.ts:7621 |
chat_member | typeof ChatMemberContext | contexts/index.d.ts:7622 |
chat_owner_changed | typeof ChatOwnerChangedContext | contexts/index.d.ts:7687 |
chat_owner_left | typeof ChatOwnerLeftContext | contexts/index.d.ts:7686 |
chat_shared | typeof ChatSharedContext | contexts/index.d.ts:7682 |
checklist_tasks_added | typeof ChecklistTasksAddedContext | contexts/index.d.ts:7664 |
checklist_tasks_done | typeof ChecklistTasksDoneContext | contexts/index.d.ts:7663 |
chosen_inline_result | typeof ChosenInlineResultContext | contexts/index.d.ts:7624 |
community_chat_added | typeof CommunityChatAddedContext | contexts/index.d.ts:7633 |
community_chat_joined | typeof CommunityChatJoinedContext | contexts/index.d.ts:7634 |
community_chat_removed | typeof CommunityChatRemovedContext | contexts/index.d.ts:7635 |
delete_chat_photo | typeof DeleteChatPhotoContext | contexts/index.d.ts:7625 |
deleted_business_messages | typeof BusinessMessagesDeletedContext | contexts/index.d.ts:7645 |
direct_message_price_changed | typeof DirectMessagePriceChangedContext | contexts/index.d.ts:7665 |
edited_business_message | typeof MessageContext | contexts/index.d.ts:7643 |
edited_channel_post | typeof MessageContext | contexts/index.d.ts:7641 |
edited_message | typeof MessageContext | contexts/index.d.ts:7640 |
forum_topic_closed | typeof ForumTopicClosedContext | contexts/index.d.ts:7673 |
forum_topic_created | typeof ForumTopicCreatedContext | contexts/index.d.ts:7671 |
forum_topic_edited | typeof ForumTopicEditedContext | contexts/index.d.ts:7672 |
forum_topic_reopened | typeof ForumTopicReopenedContext | contexts/index.d.ts:7674 |
general_forum_topic_hidden | typeof GeneralForumTopicHiddenContext | contexts/index.d.ts:7675 |
general_forum_topic_unhidden | typeof GeneralForumTopicUnhiddenContext | contexts/index.d.ts:7676 |
gift | typeof GiftContext | contexts/index.d.ts:7683 |
gift_upgrade_sent | typeof GiftUpgradeSentContext | contexts/index.d.ts:7684 |
giveaway_completed | typeof GiveawayCompletedContext | contexts/index.d.ts:7701 |
giveaway_created | typeof GiveawayCreatedContext | contexts/index.d.ts:7700 |
giveaway_winners | typeof GiveawayWinnersContext | contexts/index.d.ts:7702 |
group_chat_created | typeof GroupChatCreatedContext | contexts/index.d.ts:7626 |
guest_message | typeof MessageContext | contexts/index.d.ts:7644 |
inline_query | typeof InlineQueryContext | contexts/index.d.ts:7627 |
invoice | typeof InvoiceContext | contexts/index.d.ts:7628 |
left_chat_member | typeof LeftChatMemberContext | contexts/index.d.ts:7629 |
location | typeof LocationContext | contexts/index.d.ts:7630 |
managed_bot | typeof ManagedBotContext | contexts/index.d.ts:7631 |
managed_bot_created | typeof ManagedBotCreatedContext | contexts/index.d.ts:7632 |
message | typeof MessageContext | contexts/index.d.ts:7638 |
message_auto_delete_timer_changed | typeof MessageAutoDeleteTimerChangedContext | contexts/index.d.ts:7637 |
message_reaction | typeof MessageReactionContext | contexts/index.d.ts:7696 |
message_reaction_count | typeof MessageReactionCountContext | contexts/index.d.ts:7697 |
migrate_from_chat_id | typeof MigrateFromChatIdContext | contexts/index.d.ts:7647 |
migrate_to_chat_id | typeof MigrateToChatIdContext | contexts/index.d.ts:7648 |
my_chat_member | typeof ChatMemberContext | contexts/index.d.ts:7623 |
new_chat_members | typeof NewChatMembersContext | contexts/index.d.ts:7649 |
new_chat_photo | typeof NewChatPhotoContext | contexts/index.d.ts:7650 |
new_chat_title | typeof NewChatTitleContext | contexts/index.d.ts:7651 |
paid_message_price_changed | typeof PaidMessagePriceChangedContext | contexts/index.d.ts:7688 |
passport_data | typeof PassportDataContext | contexts/index.d.ts:7652 |
pinned_message | typeof PinnedMessageContext | contexts/index.d.ts:7653 |
poll | typeof PollContext | contexts/index.d.ts:7657 |
poll_answer | typeof PollAnswerContext | contexts/index.d.ts:7654 |
poll_option_added | typeof PollOptionAddedContext | contexts/index.d.ts:7655 |
poll_option_deleted | typeof PollOptionDeletedContext | contexts/index.d.ts:7656 |
pre_checkout_query | typeof PreCheckoutQueryContext | contexts/index.d.ts:7658 |
proximity_alert_triggered | typeof ProximityAlertTriggeredContext | contexts/index.d.ts:7659 |
purchased_paid_media | typeof PaidMediaPurchasedContext | contexts/index.d.ts:7695 |
refunded_payment | typeof RefundedPaymentContext | contexts/index.d.ts:7680 |
removed_chat_boost | typeof RemovedChatBoostContext | contexts/index.d.ts:7699 |
service_message | typeof MessageContext | contexts/index.d.ts:7694 |
shipping_query | typeof ShippingQueryContext | contexts/index.d.ts:7677 |
stopped_message_generation | typeof MessageGenerationStoppedContext | contexts/index.d.ts:7636 |
subscription | typeof SubscriptionContext | contexts/index.d.ts:7678 |
successful_payment | typeof SuccessfulPaymentContext | contexts/index.d.ts:7679 |
suggested_post_approval_failed | typeof SuggestedPostApprovalFailedContext | contexts/index.d.ts:7667 |
suggested_post_approved | typeof SuggestedPostApprovedContext | contexts/index.d.ts:7666 |
suggested_post_declined | typeof SuggestedPostDeclinedContext | contexts/index.d.ts:7668 |
suggested_post_paid | typeof SuggestedPostPaidContext | contexts/index.d.ts:7669 |
suggested_post_refunded | typeof SuggestedPostRefundedContext | contexts/index.d.ts:7670 |
unique_gift | typeof UniqueGiftContext | contexts/index.d.ts:7685 |
users_shared | typeof UsersSharedContext | contexts/index.d.ts:7681 |
video_chat_ended | typeof VideoChatEndedContext | contexts/index.d.ts:7689 |
video_chat_participants_invited | typeof VideoChatParticipantsInvitedContext | contexts/index.d.ts:7690 |
video_chat_scheduled | typeof VideoChatScheduledContext | contexts/index.d.ts:7691 |
video_chat_started | typeof VideoChatStartedContext | contexts/index.d.ts:7692 |
web_app_data | typeof WebAppDataContext | contexts/index.d.ts:7693 |
write_access_allowed | typeof WriteAccessAllowedContext | contexts/index.d.ts:7660 |
Example
contextMappings["message"] is MessageContextEVENTS
constEVENTS: [keyofMessage,MessageEventName][]
Defined in: contexts/index.d.ts:59
Array of EVENTS
filterPayload
constfilterPayload: (payload) =>Record<string,unknown>
Defined in: contexts/index.d.ts:53
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:55
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:51
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:4851
This object describes paid media. Currently, it can be one of
Type Declaration
| Name | Type | Defined in |
|---|---|---|
live_photo | typeof PaidMediaLivePhoto | contexts/index.d.ts:4852 |
photo | typeof PaidMediaPhoto | contexts/index.d.ts:4855 |
preview | typeof PaidMediaPreview | contexts/index.d.ts:4853 |
video | typeof PaidMediaVideo | contexts/index.d.ts:4854 |
SERVICE_MESSAGE_EVENTS
constSERVICE_MESSAGE_EVENTS:MessageEventName[]
Defined in: contexts/index.d.ts:57
Array of SERVICE_MESSAGE_EVENTS
Functions
isRichString()
isRichString(
value):value is RichStringLike
Defined in: contexts/index.d.ts:45
Detect a @gramio/format rich value without importing @gramio/format — by its global brand symbol. Lets ctx.send/reply/editText route a rich message to sendRichMessage while keeping @gramio/contexts free of a @gramio/format dependency.
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is RichStringLike
memoizeGetters()
memoizeGetters<
T>(cls,fields):void
Defined in: contexts/index.d.ts:47
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:5866
Parameters
| Parameter | Type |
|---|---|
ms | number |
Returns
Promise<unknown>