Skip to main content
Home

Built and signed on GitHub Actions

Contexts for GramIO framework

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
70%
Published
8 months ago (0.0.23)
c
AnimationAttachment

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

f
applyMixins

Helper for construct mixins

c
Attachment

Simple attachment

T
AttachmentType

Union type of attachments type

c
AudioAttachment

This object represents an audio file to be treated as music by the Telegram clients.

c
BackgroundFillFreeformGradient

The background is a freeform gradient that rotates after every message in the chat.

c
v
backgroundFillMap

This object describes the way a background is filled based on the selected colors. Currently, it can be one of

c
BackgroundFillSolid

The background is filled using the selected color.

c
BackgroundTypeChatTheme

The background is taken directly from a built-in chat theme.

c
BackgroundTypeFill

The background is automatically filled based on the selected colors.

v
backgroundTypeMap

This object describes the type of a background. Currently, it can be one of

c
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.

c
BackgroundTypeWallpaper

The background is a wallpaper in the JPEG format.

c
Birthdate

Describes the birthdate of a user.

c
I
BoostAddedContext

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

c
BotCommand

This object represents a bot command

c
BotDescription

This object represents the bot's description.

I
BotLike

The required object that the contexts are based on

c
BotShortDescription

This object represents the bot's short description.

c
BusinessConnection

Describes the connection of the bot with a business account.

c
I
BusinessConnectionContext

This object Describes the connection of the bot with a business account.

c
BusinessIntro

Contains information about the start page settings of a Telegram Business account.

c
BusinessLocation

Contains information about the location of a Telegram Business account.

c
BusinessMessagesDeleted

Describes the connection of the bot with a business account.

c
I
BusinessMessagesDeletedContext

This object represents a boost added to a chat or changed.

c
BusinessOpeningHoursInterval

Describes an interval of time during which a business is open.

c
CallbackGame

A placeholder, currently holds no information.

c
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.

c
Chat

This object represents a chat.

c
ChatBackground

This object represents a chat background.

c
I
ChatBackgroundSetContext

This object represents a service message about chat background set.

c
ChatBoost

This object contains information about a chat boost.

c
ChatBoostAdded

This object represents a service message about a user boosting a chat.

c
I
ChatBoostContext

This object represents a boost added to a chat or changed.

c
ChatBoostRemoved

This object represents a boost added to a chat or changed.

c
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.

c
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.

c
ChatBoostSourcePremium

The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.

c
ChatBoostUpdated

This object represents a boost added to a chat or changed.

c
ChatJoinRequest

Represents a join request sent to a chat.

c
I
ChatJoinRequestContext

Represents a join request sent to a chat.

c
ChatLocation

Represents a location to which a chat is connected.

c
I
ChatMemberContext

This object represents changes in the status of a chat member.

c
c
ChatShared

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

c
I
ChatSharedContext

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

E
ChatType

Enum of ChatType property

c
ChosenInlineResult

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

c
I
T
Constructor

Type helper constructor

c
Contact

This object represents a phone contact.

c
I
ContactAttachment

This object represents a phone contact.

T
ContextType

Type util to get type of Context

T
CustomEventName

Custom Event Name

I
DefaultAttachment

Base interface for attachment

c
I
DeleteChatPhotoContext

Service message: the chat photo was deleted

c
Dice

This object represents an animated emoji that displays a random value.

c
DocumentAttachment

This object represents a general file (as opposed to photos, voice messages and audio files).

c
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.

c
EncryptedPassportElement

Contains information about documents or other Telegram Passport elements shared with the bot by the user.

E
EntityType

Enum of EntityType property

v
EVENTS

Array of EVENTS

c
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.

c
FileAttachment

Attachment with fileId and fileUniqueId properties

f
filterPayload

Helper for filter objects

c
ForumTopicClosed

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

c
I
ForumTopicClosedContext

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

c
ForumTopicCreated

This object represents a service message about a new forum topic created in the chat.

c
I
ForumTopicCreatedContext

This object represents a service message about a new forum topic created in the chat.

c
ForumTopicEdited

This object represents a service message about an edited forum topic.

c
I
ForumTopicEditedContext

This object represents a service message about an edited forum topic.

c
ForumTopicReopened

This object represents a service message about an edited forum topic.

c
I
ForumTopicReopenedContext

This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

c
c
GeneralForumTopicHidden

This object represents a service message about General forum topic hidden in the chat. Currently holds no information.

c
I
GeneralForumTopicHiddenContext

This object represents a service message about General forum topic hidden in the chat. Currently holds no information.

c
GeneralForumTopicUnhidden

This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.

c
I
GeneralForumTopicUnhiddenContext

This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.

T
GetDerives
No documentation available
c
GiveawayCompleted

This object represents a service message about the completion of a giveaway without public winners.

c
I
GiveawayCompletedContext

This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.

c
GiveawayCreated

This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.

c
I
GiveawayCreatedContext

This object represents a service message about the creation of a scheduled giveaway.

c
I
GiveawayWinnersContext

This object represents a message about the completion of a giveaway with public winners.

c
I
GroupChatCreatedContext

service message: the group has been created

c
InaccessibleMessage

This object describes a message that was deleted or is otherwise inaccessible to the bot.

c
InlineKeyboardButton

This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

c
InlineKeyboardMarkup

This object represents an inline keyboard that appears right next to the message it belongs to.

c
InlineQuery

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

c
I
InlineQueryContext

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

c
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.

c
InputLocationMessageContent

Represents the content of a location message to be sent as the result of an inline query.

c
InputPollOption

This object contains information about one answer option in a poll to send.

c
Invoice

This object contains basic information about an invoice.

c
I
InvoiceContext

Message is an invoice for a payment, information about the invoice. More about payments »

f
isParsable

Guard to check is string can be parsed via JSON.parse

f
isPlainObject

Guard to check is it play object

T
JoinUnion

Type helper to join union type

c
I
LeftChatMemberContext

A member was removed from the group, information about them (this member may be the bot itself)

c
LinkPreviewOptions

Describes the options used for link preview generation.

c
I
LocationAttachment

This object represents a point on the map.

c
I
LocationContext

This object represents a point on the map.

c
LoginUrl

This object represents a parameter of the inline keyboard button used to automatically authorize a user.

c
MaskPosition

This object describes the position on faces where a mask should be placed by default.

T
MaybeArray

Type helper to add array and non-array type

f
memoizeGetters

Helper for getters memoization

c
MenuButton

This object describes the bot's menu button in a private chat.

c
MessageAutoDeleteTimerChanged

This object represents a service message about a change in auto-delete timer settings

c
I
MessageAutoDeleteTimerChangedContext

This object represents a service message about a change in auto-delete timer settings.

c
MessageEntity

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

T
MessageEventName

Union type of MessageEvent names

c
MessageId

This object represents a unique message identifier.

c
MessageOriginChannel

The message was originally sent to a channel chat.

c
MessageOriginChat

The message was originally sent on behalf of a chat to a group chat.

c
MessageOriginHiddenUser

The message was originally sent by an unknown user.

c
MessageOriginUser

The message was originally sent by a known user.

c
I
MessageReactionContext

This object represents a change of a reaction on a message performed by a user.

c
I
MessageReactionCountContext

This object represents reaction changes on a message with anonymous reactions.

c
MessageReactionCountUpdated

This object represents reaction changes on a message with anonymous reactions.

c
MessageReactionUpdated

This object represents a change of a reaction on a message performed by a user.

c
I
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.

c
I
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.

c
I
NewChatMembersContext

New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

c
I
NewChatPhotoContext

A chat photo was change to this value

c
I
NewChatTitleContext

A chat title was changed to this value

T
Optional

Make some keys optional

c
OrderInfo

This object represents information about an order.

c
I
PaidMediaPurchasedContext

This object contains information about a paid media purchase.

c
PassportData

Contains information about Telegram Passport data shared with the bot by the user.

c
I
PassportDataContext

Describes Telegram Passport data shared with the bot by the user.

c
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.

c
PhotoAttachment

This object represents a photo file with it's sizes

c
PhotoSize

This object represents one size of a photo or a file / sticker thumbnail

c
I
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.

c
PollAnswer

This object represents an answer of a user in a non-anonymous poll.

c
I
PollAnswerContext

This object represents an answer of a user in a non-anonymous poll.

c
I
PollAttachment

This object contains information about a poll.

c
PollOption

This object contains information about one answer option in a poll.

E
PollType

Enum of PollType property

c
PreCheckoutQuery

This object contains information about an incoming pre-checkout query.

c
I
PreCheckoutQueryContext

This object contains information about an incoming pre-checkout query.

c
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.

c
I
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.

c
ReactionCount

Represents a reaction added to a message along with the number of times it was added.

c
ReactionTypeCustomEmoji

The reaction is based on a custom emoji.

c
ReactionTypeEmoji

The reaction is based on an emoji.

c
ReactionTypePaid

The reaction is paid.

c
I
RefundedPaymentContext

This object contains basic information about a successful payment.

c
I
RemovedChatBoostContext

This object represents a boost removed from a chat.

T
Require

Like Required<T> but for specified keys of T

T
RequireValue

Like Require<O, K> but it sets V as the value for K values

c
SentWebAppMessage

Contains information about an inline message sent by a Web App on behalf of a user.

v
SERVICE_MESSAGE_EVENTS

Array of SERVICE_MESSAGE_EVENTS

c
SharedUser

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.

c
ShippingQuery

This object contains information about an incoming shipping query.

c
I
ShippingQueryContext

This object contains information about an incoming shipping query.

T
SoftString

Permits string but gives hints

c
StickerSet

This object represents a sticker set.

c
Story

This object represents a story.

c
I
StoryAttachment

This object represents a story.

c
I
SuccessfulPaymentContext

This object contains basic information about a successful payment.

c
TextQuote

This object contains information about the quoted part of a message that is replied to by the given message.

T
tSendAnimation

This type represent SendAnimationParams and used by Contexts.MessageContext.sendMedia

T
tSendAudio

This type represent SendAudioParams and used by Contexts.MessageContext.sendMedia

T
tSendDocument

This type represent SendDocumentParams and used by Contexts.MessageContext.sendMedia

T
tSendMethods

This Union type represent a media that can be sended and used by Contexts.MessageContext.sendMedia

T
tSendPhoto

This type represent SendPhotoParams and used by Contexts.MessageContext.sendMedia

T
tSendSticker

This type represent SendStickerParams and used by Contexts.MessageContext.sendMedia

T
tSendVideo

This type represent SendVideoParams and used by Contexts.MessageContext.sendMedia

T
tSendVideoNote

This type represent SendVideoNoteParams and used by Contexts.MessageContext.sendMedia

T
tSendVoice

This type represent SendVoiceParams and used by Contexts.MessageContext.sendMedia

T
UpdateName

Union type of Update names

c
UserProfilePhotos

This object represent a user's profile pictures.

c
UsersShared

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.

c
I
UsersSharedContext

This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.

c
I
VenueAttachment

This object represents a venue.

c
VideoChatEnded

This object represents a service message about a video chat ended in the chat.

c
I
VideoChatEndedContext

This object represents a service message about a video chat ended in the chat.

c
VideoChatParticipantsInvited

This object represents a service message about new members invited to a video chat.

c
I
VideoChatParticipantsInvitedContext

This object represents a service message about new members invited to a video chat.

c
VideoChatScheduled

This object represents a service message about a video chat scheduled in the chat

c
I
VideoChatScheduledContext

This object represents a service message about a video chat scheduled in the chat.

c
VideoChatStarted

This object represents a service message about a video chat started in the chat. Currently holds no information.

c
I
VideoChatStartedContext

This object represents a service message about a video chat started in the chat.

c
c
VoiceAttachment

This object represents a voice note.

c
WebAppData

Contains data sent from a Web App to the bot.

c
I
WebAppDataContext

Describes data sent from a Web App to the bot.

c
WebAppInfo

Contains information about a Web App.

c
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.

c
I
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.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.