Skip to content

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

kindclasshandlerpayload
messageMessageUpdatetg.onMessageMessage
edited_messageEditedMessageUpdatetg.onEditedMessageMessage
channel_postChannelPostUpdatetg.onChannelPostMessage
edited_channel_postEditedChannelPostUpdatetg.onEditedChannelPostMessage
business_connectionBusinessConnectionUpdatetg.onBusinessConnectionBusinessConnection
business_messageBusinessMessageUpdatetg.onBusinessMessageMessage
edited_business_messageEditedBusinessMessageUpdatetg.onEditedBusinessMessageMessage
deleted_business_messagesDeletedBusinessMessagesUpdatetg.onDeletedBusinessMessagesBusinessMessagesDeleted
guest_messageGuestMessageUpdatetg.onGuestMessageMessage
message_reactionMessageReactionUpdatetg.onMessageReactionMessageReactionUpdated
message_reaction_countMessageReactionCountUpdatetg.onMessageReactionCountMessageReactionCountUpdated
inline_queryInlineQueryUpdatetg.onInlineQueryInlineQuery
chosen_inline_resultChosenInlineResultUpdatetg.onChosenInlineResultChosenInlineResult
callback_queryCallbackQueryUpdatetg.onCallbackQueryCallbackQuery
shipping_queryShippingQueryUpdatetg.onShippingQueryShippingQuery
pre_checkout_queryPreCheckoutQueryUpdatetg.onPreCheckoutQueryPreCheckoutQuery
purchased_paid_mediaPurchasedPaidMediaUpdatetg.onPurchasedPaidMediaPaidMediaPurchased
pollPollUpdatetg.onPollPoll
poll_answerPollAnswerUpdatetg.onPollAnswerPollAnswer
my_chat_memberMyChatMemberUpdatetg.onMyChatMemberChatMemberUpdated
chat_memberChatMemberUpdatetg.onChatMemberChatMemberUpdated
chat_join_requestChatJoinRequestUpdatetg.onChatJoinRequestChatJoinRequest
chat_boostChatBoostUpdatetg.onChatBoostChatBoostUpdated
removed_chat_boostRemovedChatBoostUpdatetg.onRemovedChatBoostChatBoostRemoved
managed_botManagedBotUpdatetg.onManagedBotManagedBotUpdated
new_chat_membersNewChatMembersUpdatetg.onNewChatMembersMessage
left_chat_memberLeftChatMemberUpdatetg.onLeftChatMemberMessage
new_chat_titleNewChatTitleUpdatetg.onNewChatTitleMessage
new_chat_photoNewChatPhotoUpdatetg.onNewChatPhotoMessage
delete_chat_photoDeleteChatPhotoUpdatetg.onDeleteChatPhotoMessage
group_chat_createdGroupChatCreatedUpdatetg.onGroupChatCreatedMessage
pinned_messagePinnedMessageUpdatetg.onPinnedMessageMessage
invoiceInvoiceUpdatetg.onInvoiceMessage
successful_paymentSuccessfulPaymentUpdatetg.onSuccessfulPaymentMessage
users_sharedUsersSharedUpdatetg.onUsersSharedMessage
chat_sharedChatSharedUpdatetg.onChatSharedMessage
web_app_dataWebAppDataUpdatetg.onWebAppDataMessage
video_chat_scheduledVideoChatScheduledUpdatetg.onVideoChatScheduledMessage
video_chat_startedVideoChatStartedUpdatetg.onVideoChatStartedMessage
video_chat_endedVideoChatEndedUpdatetg.onVideoChatEndedMessage
video_chat_participants_invitedVideoChatParticipantsInvitedUpdatetg.onVideoChatParticipantsInvitedMessage
forum_topic_createdForumTopicCreatedUpdatetg.onForumTopicCreatedMessage
forum_topic_editedForumTopicEditedUpdatetg.onForumTopicEditedMessage
forum_topic_closedForumTopicClosedUpdatetg.onForumTopicClosedMessage
forum_topic_reopenedForumTopicReopenedUpdatetg.onForumTopicReopenedMessage
general_forum_topic_hiddenGeneralForumTopicHiddenUpdatetg.onGeneralForumTopicHiddenMessage
general_forum_topic_unhiddenGeneralForumTopicUnhiddenUpdatetg.onGeneralForumTopicUnhiddenMessage
giveaway_createdGiveawayCreatedUpdatetg.onGiveawayCreatedMessage
giveaway_completedGiveawayCompletedUpdatetg.onGiveawayCompletedMessage
giveaway_winnersGiveawayWinnersUpdatetg.onGiveawayWinnersMessage
boost_addedBoostAddedUpdatetg.onBoostAddedMessage
message_auto_delete_timer_changedMessageAutoDeleteTimerChangedUpdatetg.onMessageAutoDeleteTimerChangedMessage
migrate_to_chat_idMigrateToChatIdUpdatetg.onMigrateToChatIdMessage
migrate_from_chat_idMigrateFromChatIdUpdatetg.onMigrateFromChatIdMessage
passport_dataPassportDataUpdatetg.onPassportDataMessage
proximity_alert_triggeredProximityAlertTriggeredUpdatetg.onProximityAlertTriggeredMessage
write_access_allowedWriteAccessAllowedUpdatetg.onWriteAccessAllowedMessage

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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut 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

answer

helpers

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
addedgetterreactions present in newReaction but not in oldReaction
removedgetterreactions 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

memberkinddescription
apigettershortcut 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

answer

helpers

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

answer

helpers

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for message?.chat.id
messageIdgettershortcut for message?.message_id
userIdgettershortcut 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

answer

helpers

memberkinddescription
apigettershortcut 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

answer

helpers

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
oldStatusgettershortcut for old_chat_member.status
newStatusgettershortcut for new_chat_member.status
wasCreator()methodtrue if old status is creator
isNowCreator()methodtrue if new status is creator
wasAdmin()methodtrue if old status is administrator
isNowAdmin()methodtrue if new status is administrator
wasMember()methodtrue if old status is member
isNowMember()methodtrue if new status is member
wasRestricted()methodtrue if old status is restricted
isNowRestricted()methodtrue if new status is restricted
wasLeft()methodtrue if old status is left
isNowLeft()methodtrue if new status is left
wasKicked()methodtrue if old status is kicked (banned)
isNowKicked()methodtrue if new status is kicked (banned)
didJoinChat()methodtrue if the user was outside the chat (left/kicked) and is now in it
didLeaveChat()methodtrue if the user was in the chat and is now outside it (left/kicked)
wasPromoted()methodtrue if the user gained creator or administrator status
wasDemoted()methodtrue if the user lost creator or administrator status
wasBanned()methodtrue if the user was just kicked (banned)
wasUnbanned()methodtrue 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
oldStatusgettershortcut for old_chat_member.status
newStatusgettershortcut for new_chat_member.status
wasCreator()methodtrue if old status is creator
isNowCreator()methodtrue if new status is creator
wasAdmin()methodtrue if old status is administrator
isNowAdmin()methodtrue if new status is administrator
wasMember()methodtrue if old status is member
isNowMember()methodtrue if new status is member
wasRestricted()methodtrue if old status is restricted
isNowRestricted()methodtrue if new status is restricted
wasLeft()methodtrue if old status is left
isNowLeft()methodtrue if new status is left
wasKicked()methodtrue if old status is kicked (banned)
isNowKicked()methodtrue if new status is kicked (banned)
didJoinChat()methodtrue if the user was outside the chat (left/kicked) and is now in it
didLeaveChat()methodtrue if the user was in the chat and is now outside it (left/kicked)
wasPromoted()methodtrue if the user gained creator or administrator status
wasDemoted()methodtrue if the user lost creator or administrator status
wasBanned()methodtrue if the user was just kicked (banned)
wasUnbanned()methodtrue 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload 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

memberkinddescription
apigettershortcut for tg.api — call any bot api method directly from the wrapped update
chatIdgettershortcut for chat.id
senderIdgetterbest-effort sender id: from.idsender_chat.idchat.id
replyToMessageIdgettershortcut for reply_to_message?.message_id
hasReplyToMessage()methodtrue if this message has reply_to_message
hasEntitiesOf(type: string)methodtrue if any entities item has the given type
hasCaptionEntitiesOf(type: string)methodtrue if any caption_entities item has the given type
isForwarded()methodalias for hasForwardOrigin()
isReply()methodtrue if this message is a reply
isMediaGroup()methodtrue if this message is part of a media group (album). use await update.collectMediaGroup() from @puregram/flow to fetch the full album
isPrivate()methodtrue if chat.type === "private"
isGroup()methodtrue if chat.type === "group" (strict — supergroups excluded)
isSupergroup()methodtrue if chat.type === "supergroup"
isChannel()methodtrue if chat.type === "channel"
download()methoddownload the message attachment as a Buffer. returns null if the message has no media. auto-picks with priority document &gt; video &gt; audio &gt; voice &gt; video_note &gt; animation &gt; live_photo &gt; photo[largest] &gt; sticker
downloadStream()methoddownload the message attachment as a node Readable. returns null if no media
downloadIterable()methoddownload the message attachment as an async-iterable byte stream. returns null if no media
downloadToFile(path: string)methoddownload the message attachment to disk. returns null if no media; otherwise resolves once the file is fully written