updates
every update kind puregram wraps (bot api 10.0). each is a dedicated class with a kind discriminant, the raw bot-api payload on update.raw, per-kind shortcuts, and ergonomic helpers. register handlers with the matching tg.on<Kind> — see dispatch & filters
| kind | class | handler | payload |
|---|---|---|---|
message | MessageUpdate | tg.onMessage | Message |
edited_message | EditedMessageUpdate | tg.onEditedMessage | Message |
channel_post | ChannelPostUpdate | tg.onChannelPost | Message |
edited_channel_post | EditedChannelPostUpdate | tg.onEditedChannelPost | Message |
business_connection | BusinessConnectionUpdate | tg.onBusinessConnection | BusinessConnection |
business_message | BusinessMessageUpdate | tg.onBusinessMessage | Message |
edited_business_message | EditedBusinessMessageUpdate | tg.onEditedBusinessMessage | Message |
deleted_business_messages | DeletedBusinessMessagesUpdate | tg.onDeletedBusinessMessages | BusinessMessagesDeleted |
guest_message | GuestMessageUpdate | tg.onGuestMessage | Message |
message_reaction | MessageReactionUpdate | tg.onMessageReaction | MessageReactionUpdated |
message_reaction_count | MessageReactionCountUpdate | tg.onMessageReactionCount | MessageReactionCountUpdated |
inline_query | InlineQueryUpdate | tg.onInlineQuery | InlineQuery |
chosen_inline_result | ChosenInlineResultUpdate | tg.onChosenInlineResult | ChosenInlineResult |
callback_query | CallbackQueryUpdate | tg.onCallbackQuery | CallbackQuery |
shipping_query | ShippingQueryUpdate | tg.onShippingQuery | ShippingQuery |
pre_checkout_query | PreCheckoutQueryUpdate | tg.onPreCheckoutQuery | PreCheckoutQuery |
purchased_paid_media | PurchasedPaidMediaUpdate | tg.onPurchasedPaidMedia | PaidMediaPurchased |
poll | PollUpdate | tg.onPoll | Poll |
poll_answer | PollAnswerUpdate | tg.onPollAnswer | PollAnswer |
my_chat_member | MyChatMemberUpdate | tg.onMyChatMember | ChatMemberUpdated |
chat_member | ChatMemberUpdate | tg.onChatMember | ChatMemberUpdated |
chat_join_request | ChatJoinRequestUpdate | tg.onChatJoinRequest | ChatJoinRequest |
chat_boost | ChatBoostUpdate | tg.onChatBoost | ChatBoostUpdated |
removed_chat_boost | RemovedChatBoostUpdate | tg.onRemovedChatBoost | ChatBoostRemoved |
managed_bot | ManagedBotUpdate | tg.onManagedBot | ManagedBotUpdated |
new_chat_members | NewChatMembersUpdate | tg.onNewChatMembers | Message |
left_chat_member | LeftChatMemberUpdate | tg.onLeftChatMember | Message |
new_chat_title | NewChatTitleUpdate | tg.onNewChatTitle | Message |
new_chat_photo | NewChatPhotoUpdate | tg.onNewChatPhoto | Message |
delete_chat_photo | DeleteChatPhotoUpdate | tg.onDeleteChatPhoto | Message |
group_chat_created | GroupChatCreatedUpdate | tg.onGroupChatCreated | Message |
pinned_message | PinnedMessageUpdate | tg.onPinnedMessage | Message |
invoice | InvoiceUpdate | tg.onInvoice | Message |
successful_payment | SuccessfulPaymentUpdate | tg.onSuccessfulPayment | Message |
users_shared | UsersSharedUpdate | tg.onUsersShared | Message |
chat_shared | ChatSharedUpdate | tg.onChatShared | Message |
web_app_data | WebAppDataUpdate | tg.onWebAppData | Message |
video_chat_scheduled | VideoChatScheduledUpdate | tg.onVideoChatScheduled | Message |
video_chat_started | VideoChatStartedUpdate | tg.onVideoChatStarted | Message |
video_chat_ended | VideoChatEndedUpdate | tg.onVideoChatEnded | Message |
video_chat_participants_invited | VideoChatParticipantsInvitedUpdate | tg.onVideoChatParticipantsInvited | Message |
forum_topic_created | ForumTopicCreatedUpdate | tg.onForumTopicCreated | Message |
forum_topic_edited | ForumTopicEditedUpdate | tg.onForumTopicEdited | Message |
forum_topic_closed | ForumTopicClosedUpdate | tg.onForumTopicClosed | Message |
forum_topic_reopened | ForumTopicReopenedUpdate | tg.onForumTopicReopened | Message |
general_forum_topic_hidden | GeneralForumTopicHiddenUpdate | tg.onGeneralForumTopicHidden | Message |
general_forum_topic_unhidden | GeneralForumTopicUnhiddenUpdate | tg.onGeneralForumTopicUnhidden | Message |
giveaway_created | GiveawayCreatedUpdate | tg.onGiveawayCreated | Message |
giveaway_completed | GiveawayCompletedUpdate | tg.onGiveawayCompleted | Message |
giveaway_winners | GiveawayWinnersUpdate | tg.onGiveawayWinners | Message |
boost_added | BoostAddedUpdate | tg.onBoostAdded | Message |
message_auto_delete_timer_changed | MessageAutoDeleteTimerChangedUpdate | tg.onMessageAutoDeleteTimerChanged | Message |
migrate_to_chat_id | MigrateToChatIdUpdate | tg.onMigrateToChatId | Message |
migrate_from_chat_id | MigrateFromChatIdUpdate | tg.onMigrateFromChatId | Message |
passport_data | PassportDataUpdate | tg.onPassportData | Message |
proximity_alert_triggered | ProximityAlertTriggeredUpdate | tg.onProximityAlertTriggered | Message |
write_access_allowed | WriteAccessAllowedUpdate | tg.onWriteAccessAllowed | Message |
message
class MessageUpdate · handler tg.onMessage · filter MessageFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
edited_message
class EditedMessageUpdate · handler tg.onEditedMessage · filter EditedMessageFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
channel_post
class ChannelPostUpdate · handler tg.onChannelPost · filter ChannelPostFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
edited_channel_post
class EditedChannelPostUpdate · handler tg.onEditedChannelPost · filter EditedChannelPostFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
business_connection
class BusinessConnectionUpdate · handler tg.onBusinessConnection · filter BusinessConnectionFilter
payload BusinessConnection — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
business_message
class BusinessMessageUpdate · handler tg.onBusinessMessage · filter BusinessMessageFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
edited_business_message
class EditedBusinessMessageUpdate · handler tg.onEditedBusinessMessage · filter EditedBusinessMessageFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
deleted_business_messages
class DeletedBusinessMessagesUpdate · handler tg.onDeletedBusinessMessages · filter DeletedBusinessMessagesFilter
payload BusinessMessagesDeleted — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
guest_message
class GuestMessageUpdate · handler tg.onGuestMessage · filter GuestMessageFilter
payload Message — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
message_reaction
class MessageReactionUpdate · handler tg.onMessageReaction · filter MessageReactionFilter
payload MessageReactionUpdated — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
added | getter | reactions present in newReaction but not in oldReaction |
removed | getter | reactions present in oldReaction but not in newReaction |
message_reaction_count
class MessageReactionCountUpdate · handler tg.onMessageReactionCount · filter MessageReactionCountFilter
payload MessageReactionCountUpdated — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
inline_query
class InlineQueryUpdate · handler tg.onInlineQuery · filter InlineQueryFilter
payload InlineQuery — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chosen_inline_result
class ChosenInlineResultUpdate · handler tg.onChosenInlineResult · filter ChosenInlineResultFilter
payload ChosenInlineResult — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
callback_query
class CallbackQueryUpdate · handler tg.onCallbackQuery · filter CallbackQueryFilter
payload CallbackQuery — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for message?.chat.id |
messageId | getter | shortcut for message?.message_id |
userId | getter | shortcut for from.id |
shipping_query
class ShippingQueryUpdate · handler tg.onShippingQuery · filter ShippingQueryFilter
payload ShippingQuery — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
pre_checkout_query
class PreCheckoutQueryUpdate · handler tg.onPreCheckoutQuery · filter PreCheckoutQueryFilter
payload PreCheckoutQuery — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
purchased_paid_media
class PurchasedPaidMediaUpdate · handler tg.onPurchasedPaidMedia · filter PurchasedPaidMediaFilter
payload PaidMediaPurchased — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
poll
class PollUpdate · handler tg.onPoll · filter PollFilter
payload Poll — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
poll_answer
class PollAnswerUpdate · handler tg.onPollAnswer · filter PollAnswerFilter
payload PollAnswer — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
my_chat_member
class MyChatMemberUpdate · handler tg.onMyChatMember · filter MyChatMemberFilter
payload ChatMemberUpdated — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · sendAudio · sendChatAction · sendChecklist · sendContact · sendDice · sendDocument · sendGame · sendGift · sendInvoice · sendLivePhoto · sendLocation · sendMediaGroup · send · sendMessageDraft · sendPaidMedia · sendPhoto · sendPoll · sendSticker · sendVenue · sendVideo · sendVideoNote · sendVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
oldStatus | getter | shortcut for old_chat_member.status |
newStatus | getter | shortcut for new_chat_member.status |
wasCreator() | method | true if old status is creator |
isNowCreator() | method | true if new status is creator |
wasAdmin() | method | true if old status is administrator |
isNowAdmin() | method | true if new status is administrator |
wasMember() | method | true if old status is member |
isNowMember() | method | true if new status is member |
wasRestricted() | method | true if old status is restricted |
isNowRestricted() | method | true if new status is restricted |
wasLeft() | method | true if old status is left |
isNowLeft() | method | true if new status is left |
wasKicked() | method | true if old status is kicked (banned) |
isNowKicked() | method | true if new status is kicked (banned) |
didJoinChat() | method | true if the user was outside the chat (left/kicked) and is now in it |
didLeaveChat() | method | true if the user was in the chat and is now outside it (left/kicked) |
wasPromoted() | method | true if the user gained creator or administrator status |
wasDemoted() | method | true if the user lost creator or administrator status |
wasBanned() | method | true if the user was just kicked (banned) |
wasUnbanned() | method | true if the user was kicked and no longer is |
chat_member
class ChatMemberUpdate · handler tg.onChatMember · filter ChatMemberFilter
payload ChatMemberUpdated — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · sendAudio · sendChatAction · sendChecklist · sendContact · sendDice · sendDocument · sendGame · sendGift · sendInvoice · sendLivePhoto · sendLocation · sendMediaGroup · send · sendMessageDraft · sendPaidMedia · sendPhoto · sendPoll · sendSticker · sendVenue · sendVideo · sendVideoNote · sendVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
oldStatus | getter | shortcut for old_chat_member.status |
newStatus | getter | shortcut for new_chat_member.status |
wasCreator() | method | true if old status is creator |
isNowCreator() | method | true if new status is creator |
wasAdmin() | method | true if old status is administrator |
isNowAdmin() | method | true if new status is administrator |
wasMember() | method | true if old status is member |
isNowMember() | method | true if new status is member |
wasRestricted() | method | true if old status is restricted |
isNowRestricted() | method | true if new status is restricted |
wasLeft() | method | true if old status is left |
isNowLeft() | method | true if new status is left |
wasKicked() | method | true if old status is kicked (banned) |
isNowKicked() | method | true if new status is kicked (banned) |
didJoinChat() | method | true if the user was outside the chat (left/kicked) and is now in it |
didLeaveChat() | method | true if the user was in the chat and is now outside it (left/kicked) |
wasPromoted() | method | true if the user gained creator or administrator status |
wasDemoted() | method | true if the user lost creator or administrator status |
wasBanned() | method | true if the user was just kicked (banned) |
wasUnbanned() | method | true if the user was kicked and no longer is |
chat_join_request
class ChatJoinRequestUpdate · handler tg.onChatJoinRequest · filter ChatJoinRequestFilter
payload ChatJoinRequest — available as update.raw; every payload field is also exposed as a camelCase getter
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · sendAudio · sendChatAction · sendChecklist · sendContact · sendDice · sendDocument · sendGame · sendGift · sendInvoice · sendLivePhoto · sendLocation · sendMediaGroup · send · sendMessageDraft · sendPaidMedia · sendPhoto · sendPoll · sendSticker · sendVenue · sendVideo · sendVideoNote · sendVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chat_boost
class ChatBoostUpdate · handler tg.onChatBoost · filter ChatBoostFilter
payload ChatBoostUpdated — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
removed_chat_boost
class RemovedChatBoostUpdate · handler tg.onRemovedChatBoost · filter RemovedChatBoostFilter
payload ChatBoostRemoved — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
managed_bot
class ManagedBotUpdate · handler tg.onManagedBot · filter ManagedBotFilter
payload ManagedBotUpdated — available as update.raw; every payload field is also exposed as a camelCase getter
no per-kind shortcuts — call any method via update.api.X(...)
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
new_chat_members
class NewChatMembersUpdate · handler tg.onNewChatMembers · filter NewChatMembersFilter
service event — derived from a Message payload when raw.new_chat_members is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
left_chat_member
class LeftChatMemberUpdate · handler tg.onLeftChatMember · filter LeftChatMemberFilter
service event — derived from a Message payload when raw.left_chat_member is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
new_chat_title
class NewChatTitleUpdate · handler tg.onNewChatTitle · filter NewChatTitleFilter
service event — derived from a Message payload when raw.new_chat_title is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
new_chat_photo
class NewChatPhotoUpdate · handler tg.onNewChatPhoto · filter NewChatPhotoFilter
service event — derived from a Message payload when raw.new_chat_photo is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
delete_chat_photo
class DeleteChatPhotoUpdate · handler tg.onDeleteChatPhoto · filter DeleteChatPhotoFilter
service event — derived from a Message payload when raw.delete_chat_photo is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
group_chat_created
class GroupChatCreatedUpdate · handler tg.onGroupChatCreated · filter GroupChatCreatedFilter
service event — derived from a Message payload when raw.group_chat_created is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
pinned_message
class PinnedMessageUpdate · handler tg.onPinnedMessage · filter PinnedMessageFilter
service event — derived from a Message payload when raw.pinned_message is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
invoice
class InvoiceUpdate · handler tg.onInvoice · filter InvoiceFilter
service event — derived from a Message payload when raw.invoice is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
successful_payment
class SuccessfulPaymentUpdate · handler tg.onSuccessfulPayment · filter SuccessfulPaymentFilter
service event — derived from a Message payload when raw.successful_payment is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
users_shared
class UsersSharedUpdate · handler tg.onUsersShared · filter UsersSharedFilter
service event — derived from a Message payload when raw.users_shared is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
chat_shared
class ChatSharedUpdate · handler tg.onChatShared · filter ChatSharedFilter
service event — derived from a Message payload when raw.chat_shared is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
web_app_data
class WebAppDataUpdate · handler tg.onWebAppData · filter WebAppDataFilter
service event — derived from a Message payload when raw.web_app_data is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
video_chat_scheduled
class VideoChatScheduledUpdate · handler tg.onVideoChatScheduled · filter VideoChatScheduledFilter
service event — derived from a Message payload when raw.video_chat_scheduled is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
video_chat_started
class VideoChatStartedUpdate · handler tg.onVideoChatStarted · filter VideoChatStartedFilter
service event — derived from a Message payload when raw.video_chat_started is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
video_chat_ended
class VideoChatEndedUpdate · handler tg.onVideoChatEnded · filter VideoChatEndedFilter
service event — derived from a Message payload when raw.video_chat_ended is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
video_chat_participants_invited
class VideoChatParticipantsInvitedUpdate · handler tg.onVideoChatParticipantsInvited · filter VideoChatParticipantsInvitedFilter
service event — derived from a Message payload when raw.video_chat_participants_invited is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
forum_topic_created
class ForumTopicCreatedUpdate · handler tg.onForumTopicCreated · filter ForumTopicCreatedFilter
service event — derived from a Message payload when raw.forum_topic_created is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
forum_topic_edited
class ForumTopicEditedUpdate · handler tg.onForumTopicEdited · filter ForumTopicEditedFilter
service event — derived from a Message payload when raw.forum_topic_edited is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
forum_topic_closed
class ForumTopicClosedUpdate · handler tg.onForumTopicClosed · filter ForumTopicClosedFilter
service event — derived from a Message payload when raw.forum_topic_closed is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
forum_topic_reopened
class ForumTopicReopenedUpdate · handler tg.onForumTopicReopened · filter ForumTopicReopenedFilter
service event — derived from a Message payload when raw.forum_topic_reopened is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
general_forum_topic_hidden
class GeneralForumTopicHiddenUpdate · handler tg.onGeneralForumTopicHidden · filter GeneralForumTopicHiddenFilter
service event — derived from a Message payload when raw.general_forum_topic_hidden is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
general_forum_topic_unhidden
class GeneralForumTopicUnhiddenUpdate · handler tg.onGeneralForumTopicUnhidden · filter GeneralForumTopicUnhiddenFilter
service event — derived from a Message payload when raw.general_forum_topic_unhidden is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
giveaway_created
class GiveawayCreatedUpdate · handler tg.onGiveawayCreated · filter GiveawayCreatedFilter
service event — derived from a Message payload when raw.giveaway_created is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
giveaway_completed
class GiveawayCompletedUpdate · handler tg.onGiveawayCompleted · filter GiveawayCompletedFilter
service event — derived from a Message payload when raw.giveaway_completed is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
giveaway_winners
class GiveawayWinnersUpdate · handler tg.onGiveawayWinners · filter GiveawayWinnersFilter
service event — derived from a Message payload when raw.giveaway_winners is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
boost_added
class BoostAddedUpdate · handler tg.onBoostAdded · filter BoostAddedFilter
service event — derived from a Message payload when raw.boost_added is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
message_auto_delete_timer_changed
class MessageAutoDeleteTimerChangedUpdate · handler tg.onMessageAutoDeleteTimerChanged · filter MessageAutoDeleteTimerChangedFilter
service event — derived from a Message payload when raw.message_auto_delete_timer_changed is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
migrate_to_chat_id
class MigrateToChatIdUpdate · handler tg.onMigrateToChatId · filter MigrateToChatIdFilter
service event — derived from a Message payload when raw.migrate_to_chat_id is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
migrate_from_chat_id
class MigrateFromChatIdUpdate · handler tg.onMigrateFromChatId · filter MigrateFromChatIdFilter
service event — derived from a Message payload when raw.migrate_from_chat_id is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
passport_data
class PassportDataUpdate · handler tg.onPassportData · filter PassportDataFilter
service event — derived from a Message payload when raw.passport_data is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
proximity_alert_triggered
class ProximityAlertTriggeredUpdate · handler tg.onProximityAlertTriggered · filter ProximityAlertTriggeredFilter
service event — derived from a Message payload when raw.proximity_alert_triggered is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |
write_access_allowed
class WriteAccessAllowedUpdate · handler tg.onWriteAccessAllowed · filter WriteAccessAllowedFilter
service event — derived from a Message payload when raw.write_access_allowed is set
shortcuts
approveChatJoinRequest · approveSuggestedPost · banChatMember · banChatSenderChat · closeForumTopic · closeGeneralForumTopic · copy · copyMany · createChatInviteLink · createChatSubscriptionInviteLink · createForumTopic · declineChatJoinRequest · declineSuggestedPost · deleteAllMessageReactions · deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · delete · deleteMessageReaction · deleteMany · editChatInviteLink · editChatSubscriptionInviteLink · editForumTopic · editGeneralForumTopic · editCaption · editMessageChecklist · editLiveLocation · editMedia · editReplyMarkup · edit · exportChatInviteLink · forward · forwardMany · getChat · getChatAdministrators · getChatGifts · getChatMember · getChatMemberCount · getChatMenuButton · getGameHighScores · getUserChatBoosts · hideGeneralForumTopic · leaveChat · pin · promoteChatMember · readBusinessMessage · removeChatVerification · reopenForumTopic · reopenGeneralForumTopic · restrictChatMember · revokeChatInviteLink · sendAnimation · replyWithAnimation · sendAudio · replyWithAudio · sendChatAction · sendChecklist · replyWithChecklist · sendContact · replyWithContact · sendDice · replyWithDice · sendDocument · replyWithDocument · sendGame · replyWithGame · sendGift · sendInvoice · replyWithInvoice · sendLivePhoto · replyWithLivePhoto · sendLocation · replyWithLocation · sendMediaGroup · replyWithMediaGroup · send · reply · sendMessageDraft · sendPaidMedia · replyWithPaidMedia · sendPhoto · replyWithPhoto · sendPoll · replyWithPoll · sendSticker · replyWithSticker · sendVenue · replyWithVenue · sendVideo · replyWithVideo · sendVideoNote · replyWithVideoNote · sendVoice · replyWithVoice · setChatAdministratorCustomTitle · setChatDescription · setChatMemberTag · setChatMenuButton · setChatPermissions · setChatPhoto · setChatStickerSet · setChatTitle · setGameScore · react · stopLiveLocation · stopPoll · unbanChatMember · unbanChatSenderChat · unhideGeneralForumTopic · unpinAllChatMessages · unpinAllForumTopicMessages · unpinAllGeneralForumTopicMessages · unpin · verifyChat
helpers
| member | kind | description |
|---|---|---|
api | getter | shortcut for tg.api — call any bot api method directly from the wrapped update |
chatId | getter | shortcut for chat.id |
senderId | getter | best-effort sender id: from.id → sender_chat.id → chat.id |
replyToMessageId | getter | shortcut for reply_to_message?.message_id |
hasReplyToMessage() | method | true if this message has reply_to_message |
hasEntitiesOf(type: string) | method | true if any entities item has the given type |
hasCaptionEntitiesOf(type: string) | method | true if any caption_entities item has the given type |
isForwarded() | method | alias for hasForwardOrigin() |
isReply() | method | true if this message is a reply |
isMediaGroup() | method | true if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album |
isPrivate() | method | true if chat.type === "private" |
isGroup() | method | true if chat.type === "group" (strict — supergroups excluded) |
isSupergroup() | method | true if chat.type === "supergroup" |
isChannel() | method | true if chat.type === "channel" |
download() | method | download the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document > video > audio > voice > video_note > animation > live_photo > photo[largest] > sticker |
downloadStream() | method | download the message attachment as a node Readable. returns null if no media |
downloadIterable() | method | download the message attachment as an async-iterable byte stream. returns null if no media |
downloadToFile(path: string) | method | download the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written |