GramIO API Reference / @gramio/contexts/dist / ChecklistTasksDoneContext
Class: ChecklistTasksDoneContext<Bot>
Defined in: contexts/index.d.ts:5548
This object represents a service message about checklist tasks done.
Extends
Context<Bot>.Constructor<ChecklistTasksDoneContext<Bot>>.Message.TargetMixin.SendMixin<Bot>.ChatActionMixin<Bot>.NodeMixin<Bot>.ChatInviteControlMixin<Bot>.ChatControlMixin<Bot>.ChatSenderControlMixin<Bot>.ChatMemberControlMixin<Bot>.PinsMixin<Bot>.CloneMixin<Bot,ChecklistTasksDoneContext<Bot>,ChecklistTasksDoneContextOptions<Bot>>
Type Parameters
| Type Parameter |
|---|
Bot extends BotLike |
Constructors
Constructor
new ChecklistTasksDoneContext<
Bot>(options):ChecklistTasksDoneContext<Bot>
Defined in: contexts/index.d.ts:5552
Parameters
| Parameter | Type |
|---|---|
options | ChecklistTasksDoneContextOptions<Bot> |
Returns
ChecklistTasksDoneContext<Bot>
Overrides
Constructor
new ChecklistTasksDoneContext(...
args):ChecklistTasksDoneContext
Defined in: contexts/index.d.ts:5548
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
ChecklistTasksDoneContext
Overrides
Context<Bot>.constructor
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
bot | public | Bot | - | Context.bot | contexts/index.d.ts:4726 |
event | public | TelegramChecklistTasksDone | - | - | contexts/index.d.ts:5551 |
payload | public | TelegramMessage | The raw data that is used for this Context | Message.payload | contexts/index.d.ts:5550 |
update? | public | TelegramUpdate | - | Context.update | contexts/index.d.ts:4728 |
updateId? | public | number | - | Context.updateId | contexts/index.d.ts:4727 |
updateType | protected | UpdateName | - | Context.updateType | contexts/index.d.ts:4729 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4732
Returns
string
Inherited from
animation
Get Signature
get animation():
AnimationAttachment
Defined in: contexts/index.d.ts:2997
Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
Returns
Inherited from
audio
Get Signature
get audio():
AudioAttachment
Defined in: contexts/index.d.ts:2999
Message is an audio file, information about the file
Returns
Inherited from
authorSignature
Get Signature
get authorSignature():
string
Defined in: contexts/index.d.ts:2973
Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
Returns
string
Inherited from
businessConnectionId
Get Signature
get businessConnectionId():
string
Defined in: contexts/index.d.ts:2937
Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
Returns
string
Inherited from
caption
Get Signature
get caption():
string
Defined in: contexts/index.d.ts:3018
Caption for the animation, audio, document, photo, video or voice, 0-1024 characters
Returns
string
Inherited from
captionEntities
Get Signature
get captionEntities():
MessageEntity[]
Defined in: contexts/index.d.ts:3023
For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Returns
Inherited from
channelChatCreated
Get Signature
get channelChatCreated():
true
Defined in: contexts/index.d.ts:3094
Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in replyMessage if someone replies to a very first message in a channel.
Returns
true
Inherited from
chat
Get Signature
get chat():
Chat
Defined in: contexts/index.d.ts:2939
Conversation the message belongs to
Returns
Inherited from
chatBackgroundSet
Get Signature
get chatBackgroundSet():
ChatBackground
Defined in: contexts/index.d.ts:3145
Service message: chat background set
Returns
Inherited from
chatBoostAdded
Get Signature
get chatBoostAdded():
ChatBoostAdded
Defined in: contexts/index.d.ts:3143
Service message: chat boost added
Returns
Inherited from
chatId
Get Signature
get chatId():
number
Defined in: contexts/index.d.ts:4763
Chat ID
Returns
number
Inherited from
chatOwnerChanged
Get Signature
get chatOwnerChanged():
ChatOwnerChanged
Defined in: contexts/index.d.ts:3069
Service message: chat owner has changed
Returns
Inherited from
chatOwnerLeft
Get Signature
get chatOwnerLeft():
ChatOwnerLeft
Defined in: contexts/index.d.ts:3067
Service message: chat owner has left
Returns
Inherited from
chatShared
Get Signature
get chatShared():
ChatShared
Defined in: contexts/index.d.ts:3127
Service message: a chat was shared with the bot
Returns
Inherited from
chatType
Get Signature
get chatType():
TelegramChatType
Defined in: contexts/index.d.ts:4767
Chat type
Returns
Inherited from
checklist
Get Signature
get checklist():
Checklist
Defined in: contexts/index.d.ts:2952
Returns
Inherited from
checklistMessage
Get Signature
get checklistMessage():
Message
Defined in: contexts/index.d.ts:5556
Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
Returns
checklistTasksAdded
Get Signature
get checklistTasksAdded():
ChecklistTasksAdded
Defined in: contexts/index.d.ts:3150
Service message: checklist tasks added
Returns
Inherited from
checklistTasksDone
Get Signature
get checklistTasksDone():
ChecklistTasksDone
Defined in: contexts/index.d.ts:3147
Service message: checklist tasks done
Returns
Inherited from
connectedWebsite
Get Signature
get connectedWebsite():
string
Defined in: contexts/index.d.ts:3053
The domain name of the website on which the user has logged in.
Returns
string
Inherited from
contact
Get Signature
get contact():
Contact
Defined in: contexts/index.d.ts:3031
Message is a shared contact, information about the contact
Returns
Inherited from
createdAt
Get Signature
get createdAt():
number
Defined in: contexts/index.d.ts:2935
Date the message was sent in Unix time
Returns
number
Inherited from
deleteChatPhoto
Get Signature
get deleteChatPhoto():
true
Defined in: contexts/index.d.ts:3075
Service message: the chat photo was deleted
Returns
true
Inherited from
dice
Get Signature
get dice():
Dice
Defined in: contexts/index.d.ts:3033
Message is a dice with random value from 1 to 6
Returns
Inherited from
directMessagePriceChanged
Get Signature
get directMessagePriceChanged():
DirectMessagePriceChanged
Defined in: contexts/index.d.ts:3152
Service message: direct message price changed
Returns
Inherited from
Message.directMessagePriceChanged
directMessagesTopic
Get Signature
get directMessagesTopic():
DirectMessagesTopic
Defined in: contexts/index.d.ts:2918
Optional. Information about the direct messages chat topic that contains the message
Returns
Inherited from
document
Get Signature
get document():
DocumentAttachment
Defined in: contexts/index.d.ts:3001
Message is a general file, information about the file
Returns
Inherited from
effectId
Get Signature
get effectId():
string
Defined in: contexts/index.d.ts:2992
Unique identifier of the message effect added to the message
Returns
string
Inherited from
entities
Get Signature
get entities():
MessageEntity[]
Defined in: contexts/index.d.ts:2986
For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
Returns
Inherited from
externalReply
Get Signature
get externalReply():
ExternalReplyInfo
Defined in: contexts/index.d.ts:2954
Information about the message that is being replied to, which may come from another chat or forum topic
Returns
Inherited from
forumTopicClosed
Get Signature
get forumTopicClosed():
ForumTopicClosed
Defined in: contexts/index.d.ts:3168
Service message: forum topic closed
Returns
Inherited from
forumTopicCreated
Get Signature
get forumTopicCreated():
ForumTopicCreated
Defined in: contexts/index.d.ts:3164
Service message: forum topic created
Returns
Inherited from
forumTopicEdited
Get Signature
get forumTopicEdited():
ForumTopicEdited
Defined in: contexts/index.d.ts:3166
Service message: forum topic edited
Returns
Inherited from
forumTopicReopened
Get Signature
get forumTopicReopened():
ForumTopicReopened
Defined in: contexts/index.d.ts:3170
Service message: forum topic reopened
Returns
Inherited from
forwardOrigin
Get Signature
get forwardOrigin():
MessageOriginUser|MessageOriginChat|MessageOriginChannel|MessageOriginHiddenUser
Defined in: contexts/index.d.ts:2941
Information about the original message for forwarded messages
Returns
MessageOriginUser | MessageOriginChat | MessageOriginChannel | MessageOriginHiddenUser
Inherited from
from
Get Signature
get from():
User
Defined in: contexts/index.d.ts:2920
Sender, empty for messages sent to channels
Returns
Inherited from
game
Get Signature
get game():
Game
Defined in: contexts/index.d.ts:3035
Message is a game, information about the game
Returns
Inherited from
generalForumTopicHidden
Get Signature
get generalForumTopicHidden():
GeneralForumTopicHidden
Defined in: contexts/index.d.ts:3172
Service message: the 'General' forum topic hidden
Returns
Inherited from
Message.generalForumTopicHidden
generalForumTopicUnhidden
Get Signature
get generalForumTopicUnhidden():
GeneralForumTopicUnhidden
Defined in: contexts/index.d.ts:3174
Service message: the 'General' forum topic unhidden
Returns
Inherited from
Message.generalForumTopicUnhidden
gift
Get Signature
get gift():
GiftInfo
Defined in: contexts/index.d.ts:3129
Service message: a gift was sent to the chat
Returns
Inherited from
giftUpgradeSent
Get Signature
get giftUpgradeSent():
GiftInfo
Defined in: contexts/index.d.ts:3131
Service message: upgrade of a gift was purchased after the gift was sent
Returns
Inherited from
giveaway
Get Signature
get giveaway():
Giveaway
Defined in: contexts/index.d.ts:3176
The message is a scheduled giveaway message
Returns
Inherited from
giveawayCompleted
Get Signature
get giveawayCompleted():
GiveawayCompleted
Defined in: contexts/index.d.ts:3180
Service message: a giveaway without public winners was completed
Returns
Inherited from
giveawayCreated
Get Signature
get giveawayCreated():
GiveawayCreated
Defined in: contexts/index.d.ts:3178
Service message: a scheduled giveaway was created
Returns
Inherited from
giveawayWinners
Get Signature
get giveawayWinners():
GiveawayWinners
Defined in: contexts/index.d.ts:3182
A giveaway with public winners was completed
Returns
Inherited from
groupChatCreated
Get Signature
get groupChatCreated():
true
Defined in: contexts/index.d.ts:3077
Service message: the group has been created
Returns
true
Inherited from
id
Get Signature
get id():
number
Defined in: contexts/index.d.ts:2914
Unique message identifier inside this chat
Returns
number
Inherited from
invoice
Get Signature
get invoice():
Invoice
Defined in: contexts/index.d.ts:3118
Message is an invoice for a payment, information about the invoice
Returns
Inherited from
leftChatMember
Get Signature
get leftChatMember():
User
Defined in: contexts/index.d.ts:3065
A member was removed from the group, information about them (this member may be the bot itself)
Returns
Inherited from
linkPreviewOptions
Get Signature
get linkPreviewOptions():
LinkPreviewOptions
Defined in: contexts/index.d.ts:2988
Options used for link preview generation for the message, if it is a text message and link preview options were changed
Returns
Inherited from
location
Get Signature
get location():
Location
Defined in: contexts/index.d.ts:3045
Message is a shared location, information about the location
Returns
Inherited from
markedAsDoneTaskIds
Get Signature
get markedAsDoneTaskIds():
number[]
Defined in: contexts/index.d.ts:5560
Optional. Identifiers of the tasks that were marked as done
Returns
number[]
markedAsNotDoneTaskIds
Get Signature
get markedAsNotDoneTaskIds():
number[]
Defined in: contexts/index.d.ts:5564
Optional. Identifiers of the tasks that were marked as not done
Returns
number[]
mediaGroupId
Get Signature
get mediaGroupId():
string
Defined in: contexts/index.d.ts:2968
The unique identifier of a media message group this message belongs to
Returns
string
Inherited from
messageAutoDeleteTimerChanged
Get Signature
get messageAutoDeleteTimerChanged():
MessageAutoDeleteTimerChanged
Defined in: contexts/index.d.ts:3087
Service message: auto-delete timer settings changed in the chat
Returns
Inherited from
Message.messageAutoDeleteTimerChanged
migrateFromChatId
Get Signature
get migrateFromChatId():
number
Defined in: contexts/index.d.ts:3110
The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
Returns
number
Inherited from
migrateToChatId
Get Signature
get migrateToChatId():
number
Defined in: contexts/index.d.ts:3102
The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
Returns
number
Inherited from
newChatMembers
Get Signature
get newChatMembers():
User[]
Defined in: contexts/index.d.ts:3060
New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
Returns
User[]
Inherited from
newChatPhoto
Get Signature
get newChatPhoto():
PhotoSize[]
Defined in: contexts/index.d.ts:3073
A chat photo was change to this value
Returns
Inherited from
newChatTitle
Get Signature
get newChatTitle():
string
Defined in: contexts/index.d.ts:3071
A chat title was changed to this value
Returns
string
Inherited from
paidStarCount
Get Signature
get paidStarCount():
number
Defined in: contexts/index.d.ts:2977
Optional. The number of Telegram Stars that were paid by the sender of the message to send it
Returns
number
Inherited from
passportData
Get Signature
get passportData():
PassportData
Defined in: contexts/index.d.ts:3055
Telegram Passport data
Returns
Inherited from
photo
Get Signature
get photo():
PhotoSize[]
Defined in: contexts/index.d.ts:3003
Message is a photo, available sizes of the photo
Returns
Inherited from
pinnedMessage
Get Signature
get pinnedMessage():
Omit<Message,"replyMessage"> |InaccessibleMessage
Defined in: contexts/index.d.ts:3116
Specified message was pinned. Note that the Message object in this field will not contain further replyMessage fields even if it is itself a reply.
Returns
Omit<Message, "replyMessage"> | InaccessibleMessage
Inherited from
poll
Get Signature
get poll():
Poll
Defined in: contexts/index.d.ts:3037
Message is a native poll, information about the poll
Returns
Inherited from
proximityAlertTriggered
Get Signature
get proximityAlertTriggered():
ProximityAlertTriggered
Defined in: contexts/index.d.ts:3139
Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
Returns
Inherited from
Message.proximityAlertTriggered
quote
Get Signature
get quote():
TextQuote
Defined in: contexts/index.d.ts:2956
For replies that quote part of the original message, the quoted part of the message
Returns
Inherited from
replyMarkup
Get Signature
get replyMarkup():
InlineKeyboardMarkup
Defined in: contexts/index.d.ts:3051
Inline keyboard attached to the message.
login_url buttons are represented as ordinary url buttons.
Returns
Inherited from
replyMessage
Get Signature
get replyMessage():
Omit<Message,"replyMessage">
Defined in: contexts/index.d.ts:2947
For replies, the original message
Returns
Omit<Message, "replyMessage">
Inherited from
replyStory
Get Signature
get replyStory():
Story
Defined in: contexts/index.d.ts:2949
For replies to a story, the original story
Returns
Inherited from
replyToChecklistTaskId
Get Signature
get replyToChecklistTaskId():
number
Defined in: contexts/index.d.ts:2951
Optional. Identifier of the specific checklist task that is being replied to
Returns
number
Inherited from
Message.replyToChecklistTaskId
senderBoostCount
Get Signature
get senderBoostCount():
number
Defined in: contexts/index.d.ts:2929
If the sender of the message boosted the chat, the number of boosts added by the user
Returns
number
Inherited from
senderBusinessBot
Get Signature
get senderBusinessBot():
User
Defined in: contexts/index.d.ts:2931
The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.
Returns
Inherited from
senderChat
Get Signature
get senderChat():
Chat
Defined in: contexts/index.d.ts:2927
Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group
Returns
Inherited from
senderId
Get Signature
get senderId():
number
Defined in: contexts/index.d.ts:4761
Sender's ID
Returns
number
Inherited from
senderTag
Get Signature
get senderTag():
string
Defined in: contexts/index.d.ts:2933
Tag or custom title of the sender of the message; for supergroups only
Returns
string
Inherited from
sticker
Get Signature
get sticker():
StickerAttachment
Defined in: contexts/index.d.ts:3005
Message is a sticker, information about the sticker
Returns
Inherited from
story
Get Signature
get story():
StoryAttachment
Defined in: contexts/index.d.ts:3007
Message is a forwarded story
Returns
Inherited from
successfulPayment
Get Signature
get successfulPayment():
SuccessfulPayment
Defined in: contexts/index.d.ts:3123
Message is a service message about a successful payment, information about the payment.
Returns
Inherited from
suggestedPostApprovalFailed
Get Signature
get suggestedPostApprovalFailed():
SuggestedPostApprovalFailed
Defined in: contexts/index.d.ts:3156
Service message: approval of a suggested post has failed
Returns
Inherited from
Message.suggestedPostApprovalFailed
suggestedPostApproved
Get Signature
get suggestedPostApproved():
SuggestedPostApproved
Defined in: contexts/index.d.ts:3154
Service message: a suggested post was approved
Returns
Inherited from
suggestedPostDeclined
Get Signature
get suggestedPostDeclined():
SuggestedPostDeclined
Defined in: contexts/index.d.ts:3158
Service message: a suggested post was declined
Returns
Inherited from
suggestedPostInfo
Get Signature
get suggestedPostInfo():
SuggestedPostInfo
Defined in: contexts/index.d.ts:2990
Optional. Information about suggested post parameters if the message is a suggested post
Returns
Inherited from
suggestedPostPaid
Get Signature
get suggestedPostPaid():
SuggestedPostPaid
Defined in: contexts/index.d.ts:3160
Service message: payment for a suggested post was received
Returns
Inherited from
suggestedPostRefunded
Get Signature
get suggestedPostRefunded():
SuggestedPostRefunded
Defined in: contexts/index.d.ts:3162
Service message: payment for a suggested post was refunded
Returns
Inherited from
supergroupChatCreated
Get Signature
get supergroupChatCreated():
true
Defined in: contexts/index.d.ts:3085
Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in replyMessage if someone replies to a very first message in a directly created supergroup.
Returns
true
Inherited from
text
Get Signature
get text():
string
Defined in: contexts/index.d.ts:2981
For text messages, the actual UTF-8 text of the message, 0-4096 characters
Returns
string
Inherited from
threadId
Get Signature
get threadId():
number
Defined in: contexts/index.d.ts:2916
Unique identifier of a message thread to which the message belongs; for supergroups only
Returns
number
Inherited from
uniqueGift
Get Signature
get uniqueGift():
UniqueGiftInfo
Defined in: contexts/index.d.ts:3133
Service message: a unique gift was sent to the chat
Returns
Inherited from
updatedAt
Get Signature
get updatedAt():
number
Defined in: contexts/index.d.ts:2960
Date the message was last edited in Unix time
Returns
number
Inherited from
usersShared
Get Signature
get usersShared():
UsersShared
Defined in: contexts/index.d.ts:3125
Service message: a user was shared with the bot
Returns
Inherited from
venue
Get Signature
get venue():
Venue
Defined in: contexts/index.d.ts:3043
Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set
Returns
Inherited from
viaBot
Get Signature
get viaBot():
User
Defined in: contexts/index.d.ts:2958
Bot through which the message was sent
Returns
Inherited from
video
Get Signature
get video():
VideoAttachment
Defined in: contexts/index.d.ts:3009
Message is a video, information about the video
Returns
Inherited from
videoChatEnded
Get Signature
get videoChatEnded():
VideoChatEnded
Defined in: contexts/index.d.ts:3188
Service message: video chat ended
Returns
Inherited from
videoChatParticipantsInvited
Get Signature
get videoChatParticipantsInvited():
VideoChatParticipantsInvited
Defined in: contexts/index.d.ts:3190
Service message: new participants invited to a video chat
Returns
Inherited from
Message.videoChatParticipantsInvited
videoChatScheduled
Get Signature
get videoChatScheduled():
VideoChatScheduled
Defined in: contexts/index.d.ts:3184
Service message: video chat scheduled
Returns
Inherited from
videoChatStarted
Get Signature
get videoChatStarted():
VideoChatStarted
Defined in: contexts/index.d.ts:3186
Service message: video chat started
Returns
Inherited from
videoNote
Get Signature
get videoNote():
VideoNoteAttachment
Defined in: contexts/index.d.ts:3011
Message is a video note, information about the video message
Returns
Inherited from
voice
Get Signature
get voice():
VoiceAttachment
Defined in: contexts/index.d.ts:3013
Message is a voice message, information about the file
Returns
Inherited from
webAppData
Get Signature
get webAppData():
WebAppData
Defined in: contexts/index.d.ts:3192
Service message: data sent by a Web App
Returns
Inherited from
writeAccessAllowed
Get Signature
get writeAccessAllowed():
WriteAccessAllowed
Defined in: contexts/index.d.ts:3141
Service message: the user allowed the bot added to the attachment menu to write messages
Returns
Inherited from
Methods
banChatSender()
banChatSender(
senderChatId,params?):Promise<true>
Defined in: contexts/index.d.ts:5148
Bans a channel chat
Parameters
| Parameter | Type |
|---|---|
senderChatId | number |
params? | Optional<BanChatSenderChatParams, "chat_id" | "sender_chat_id"> |
Returns
Promise<true>
Inherited from
ChatSenderControlMixin.banChatSender
banMember()
banMember(
params?):Promise<true>
Defined in: contexts/index.d.ts:5132
Bans a user (o_O)
Parameters
| Parameter | Type |
|---|---|
params? | Optional<BanChatMemberParams, "chat_id" | "user_id"> |
Returns
Promise<true>
Inherited from
ChatMemberControlMixin.banMember
clearReactions()
clearReactions(
params?):Promise<true>
Defined in: contexts/index.d.ts:5088
Clears reactions from the message
Parameters
| Parameter | Type |
|---|---|
params? | Optional<SetMessageReactionParams, "chat_id" | "message_id"> |
Returns
Promise<true>
Inherited from
clone()
clone(
options?):ChecklistTasksDoneContext
Defined in: contexts/index.d.ts:5273
Parameters
| Parameter | Type |
|---|---|
options? | ChecklistTasksDoneContextOptions |
Returns
ChecklistTasksDoneContext
Inherited from
copy()
copy(
params?):Promise<MessageId>
Defined in: contexts/index.d.ts:5074
Copies current message [into other chat if chatId is provided]
Parameters
| Parameter | Type |
|---|---|
params? | Optional<CopyMessageParams, "chat_id" | "message_id" | "from_chat_id"> |
Returns
Promise<MessageId>
Inherited from
copyMessages()
copyMessages(
chatId,ids,params?):Promise<MessageId[]>
Defined in: contexts/index.d.ts:5076
Copies messages from current chat and sends to another
Parameters
| Parameter | Type |
|---|---|
chatId | string | number |
ids | number[] |
params? | Optional<CopyMessagesParams, "chat_id" | "message_ids" | "from_chat_id"> |
Returns
Promise<MessageId[]>
Inherited from
createActionController()
createActionController(
action,params?):ChatActionController<Bot>
Defined in: contexts/index.d.ts:5262
Parameters
| Parameter | Type |
|---|---|
action | SendChatActionAction |
params? | Pick<SendChatActionParams, "business_connection_id" | "message_thread_id"> & object & CreateActionControllerParams |
Returns
ChatActionController<Bot>
Deprecated
Creates a controller that when start()ed executes sendChatAction(action) every interval milliseconds until stop()ped
Inherited from
ChatActionMixin.createActionController
createInviteLink()
createInviteLink(
params?):Promise<TelegramChatInviteLink>
Defined in: contexts/index.d.ts:5120
Creates an additional invite link
Parameters
| Parameter | Type |
|---|---|
params? | Optional<CreateChatInviteLinkParams, "chat_id"> |
Returns
Promise<TelegramChatInviteLink>
Inherited from
ChatInviteControlMixin.createInviteLink
delete()
delete(
params?):Promise<true>
Defined in: contexts/index.d.ts:5045
Deletes current message
Parameters
| Parameter | Type |
|---|---|
params? | Optional<DeleteMessageParams, "chat_id" | "message_id"> |
Returns
Promise<true>
Inherited from
deleteChatStickerSet()
deleteChatStickerSet(
params?):Promise<true>
Defined in: contexts/index.d.ts:5110
Deletes group stickerset
Parameters
| Parameter | Type |
|---|---|
params? | Optional<DeleteChatStickerSetParams, "chat_id"> |
Returns
Promise<true>
Inherited from
ChatControlMixin.deleteChatStickerSet
deleteMessages()
deleteMessages(
ids):Promise<true>
Defined in: contexts/index.d.ts:5047
Deletes messages in current chat
Parameters
| Parameter | Type |
|---|---|
ids | number[] |
Returns
Promise<true>
Inherited from
editCaption()
editCaption(
caption,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5063
Edits current message caption. An alias for editMessageCaption
Parameters
| Parameter | Type |
|---|---|
caption | NonNullable<string | { toString: string; }> |
params? | Partial<EditMessageCaptionParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editChecklist()
editChecklist(
checklist,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5064
Parameters
| Parameter | Type |
|---|---|
checklist | TelegramInputChecklist |
params? | Partial<EditMessageChecklistParams> |
Returns
Promise<MessageContext<Bot>>
Inherited from
editInviteLink()
editInviteLink(
link,params?):Promise<TelegramChatInviteLink>
Defined in: contexts/index.d.ts:5122
Edits non-primary invite link created by the bot
Parameters
| Parameter | Type |
|---|---|
link | string |
params? | Optional<EditChatInviteLinkParams, "chat_id" | "invite_link"> |
Returns
Promise<TelegramChatInviteLink>
Inherited from
ChatInviteControlMixin.editInviteLink
editLiveLocation()
editLiveLocation(
params):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5051
Edits current message live location. An alias for editMessageLiveLocation
Parameters
| Parameter | Type |
|---|---|
params | EditMessageLiveLocationParams |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editMedia()
editMedia(
media,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5068
Edits current message media. An alias for editMessageMedia
Parameters
| Parameter | Type |
|---|---|
media | TelegramInputMedia |
params? | Partial<EditMessageMediaParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editMessageCaption()
editMessageCaption(
caption,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5061
Edits current message caption
Parameters
| Parameter | Type |
|---|---|
caption | NonNullable<string | { toString: string; }> |
params? | Partial<EditMessageCaptionParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editMessageLiveLocation()
editMessageLiveLocation(
params):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5049
Edits current message live location
Parameters
| Parameter | Type |
|---|---|
params | EditMessageLiveLocationParams |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
NodeMixin.editMessageLiveLocation
editMessageMedia()
editMessageMedia(
media,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5066
Edits current message media
Parameters
| Parameter | Type |
|---|---|
media | TelegramInputMedia |
params? | Partial<EditMessageMediaParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editMessageReplyMarkup()
editMessageReplyMarkup(
replyMarkup,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5070
Edits current message reply markup
Parameters
| Parameter | Type |
|---|---|
replyMarkup | TelegramInlineKeyboardMarkup | { toJSON: TelegramInlineKeyboardMarkup; } |
params? | Partial<EditMessageReplyMarkupParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
NodeMixin.editMessageReplyMarkup
editMessageText()
editMessageText(
text,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5057
Edits current message text
Parameters
| Parameter | Type |
|---|---|
text | string | { toString: string; } |
params? | Partial<EditMessageTextParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editReplyMarkup()
editReplyMarkup(
replyMarkup,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5072
Edits current message reply markup. An alias for editMessageReplyMarkup
Parameters
| Parameter | Type |
|---|---|
replyMarkup | TelegramInlineKeyboardMarkup | { toJSON: TelegramInlineKeyboardMarkup; } |
params? | Partial<EditMessageReplyMarkupParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
editText()
editText(
text,params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5059
Edits current message text. An alias for editMessageText
Parameters
| Parameter | Type |
|---|---|
text | string | { toString: string; } |
params? | Partial<EditMessageTextParams> |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
exportInviteLink()
exportInviteLink(
params?):Promise<string>
Defined in: contexts/index.d.ts:5118
Generates new primary invite link
Parameters
| Parameter | Type |
|---|---|
params? | Optional<ExportChatInviteLinkParams, "chat_id"> |
Returns
Promise<string>
Inherited from
ChatInviteControlMixin.exportInviteLink
forward()
forward(
params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5078
Forwards current message [into other chat if chatId is provided]
Parameters
| Parameter | Type |
|---|---|
params? | Optional<ForwardMessageParams, "chat_id" | "message_id" | "from_chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
forwardMessages()
forwardMessages(
chatId,ids,params?):Promise<MessageId[]>
Defined in: contexts/index.d.ts:5080
Forwards messages from current chat to another
Parameters
| Parameter | Type |
|---|---|
chatId | string | number |
ids | number[] |
params? | Optional<ForwardMessagesParams, "chat_id" | "message_ids" | "from_chat_id"> |
Returns
Promise<MessageId[]>
Inherited from
getChatBoosts()
getChatBoosts(
userId):Promise<TelegramUserChatBoosts>
Defined in: contexts/index.d.ts:4938
Returns chat boosts by the user
Parameters
| Parameter | Type |
|---|---|
userId | number |
Returns
Promise<TelegramUserChatBoosts>
Inherited from
hasFrom()
hasFrom(): this is Require<ChecklistTasksDoneContext<Bot>, "from" | "senderId">
Defined in: contexts/index.d.ts:4742
Checks if the instance has from and senderId properties
Returns
this is Require<ChecklistTasksDoneContext<Bot>, "from" | "senderId">
Inherited from
hasMediaSpoiler()
hasMediaSpoiler():
true
Defined in: contexts/index.d.ts:3029
true, if the message media is covered by a spoiler animation
Returns
true
Inherited from
hasProtectedContent()
hasProtectedContent():
true
Defined in: contexts/index.d.ts:2962
true, if the message can't be forwarded
Returns
true
Inherited from
hasSenderChat()
hasSenderChat():
this is Require<ChecklistTasksDoneContext<Bot>, "senderChat">
Defined in: contexts/index.d.ts:4746
Checks if the instance has senderChat property
Returns
this is Require<ChecklistTasksDoneContext<Bot>, "senderChat">
Inherited from
is()
is<
T>(rawTypes):this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Defined in: contexts/index.d.ts:4735
Type Parameters
| Type Parameter |
|---|
T extends UpdateName |
Parameters
| Parameter | Type |
|---|---|
rawTypes | MaybeArray<SoftString<T>> |
Returns
this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Inherited from
isAutomaticForward()
isAutomaticForward():
true
Defined in: contexts/index.d.ts:2945
true, if the message is a channel post that was automatically forwarded to the connected discussion group
Returns
true
Inherited from
isChannel()
isChannel():
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Channel>
Defined in: contexts/index.d.ts:4775
Is this chat a channel?
Returns
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Channel>
Inherited from
isFromOffline()
isFromOffline():
true
Defined in: contexts/index.d.ts:2964
true, True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message
Returns
true
Inherited from
isGroup()
isGroup():
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Group>
Defined in: contexts/index.d.ts:4771
Is this chat a group?
Returns
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Group>
Inherited from
isPaidPost()
isPaidPost():
true
Defined in: contexts/index.d.ts:2966
Optional. True, if the message is a paid post
Returns
true
Inherited from
isPM()
isPM():
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Private>
Defined in: contexts/index.d.ts:4769
Is this chat a private one?
Returns
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Private>
Inherited from
isShowCaptionAboveMedia()
isShowCaptionAboveMedia():
boolean
Defined in: contexts/index.d.ts:3027
True, if the caption must be shown above the message media
Returns
boolean
Inherited from
Message.isShowCaptionAboveMedia
isSupergroup()
isSupergroup():
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Supergroup>
Defined in: contexts/index.d.ts:4773
Is this chat a supergroup?
Returns
this is RequireValue<ChecklistTasksDoneContext<Bot>, "chatType", Supergroup>
Inherited from
isTopicMessage()
isTopicMessage():
boolean
Defined in: contexts/index.d.ts:2943
true, if the message is sent to a forum topic
Returns
boolean
Inherited from
pinChatMessage()
pinChatMessage(
params?):Promise<true>
Defined in: contexts/index.d.ts:5195
Adds message to the list of pinned messages
Parameters
| Parameter | Type |
|---|---|
params? | Optional<PinChatMessageParams, "chat_id" | "message_id"> |
Returns
Promise<true>
Inherited from
promoteMember()
promoteMember(
params?):Promise<true>
Defined in: contexts/index.d.ts:5138
Promotes/demotes a user (o_o)
Parameters
| Parameter | Type |
|---|---|
params? | Optional<PromoteChatMemberParams, "chat_id" | "user_id"> |
Returns
Promise<true>
Inherited from
ChatMemberControlMixin.promoteMember
quoteWithAnimation()
quoteWithAnimation(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5008
Replies to current message with a quote and an animation
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendAnimationParams, "caption" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "caption_entities" | "show_caption_above_media" | "has_spoiler" | "thumbnail" | "duration" | "width" | "height"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithAudio()
quoteWithAudio(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5000
Replies to current message with a quote and an audio
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendAudioParams, "caption" | "title" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "caption_entities" | "thumbnail" | "duration" | "performer"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithContact()
quoteWithContact(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5033
Replies to current message with a quote and a contact
Parameters
| Parameter | Type |
|---|---|
params | object & Pick<SendContactParams, "phone_number" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "first_name" | "last_name" | "vcard"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithDice()
quoteWithDice(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5041
Replies to current message with a quote and a dice
Parameters
| Parameter | Type |
|---|---|
params | object & object & Partial<SendDiceParams> & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithDocument()
quoteWithDocument(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4996
Replies to current message with a quote and a document
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendDocumentParams, "caption" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "caption_entities" | "thumbnail" | "disable_content_type_detection"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithInvoice()
quoteWithInvoice(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5029
Replies to current message with a quote and an invoice
Parameters
| Parameter | Type |
|---|---|
params | object & Pick<SendInvoiceParams, "payload" | "currency" | "title" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "description" | "provider_token" | "prices" | "max_tip_amount" | "suggested_tip_amounts" | "start_parameter" | "provider_data" | "photo_url" | "photo_size" | "photo_width" | "photo_height" | "need_name" | "need_phone_number" | "need_email" | "need_shipping_address" | "send_phone_number_to_provider" | "send_email_to_provider" | "is_flexible"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithLocation()
quoteWithLocation(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5024
Replies to current message with a quote and a location
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendLocationParams, "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "horizontal_accuracy" | "live_period" | "heading" | "proximity_alert_radius"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithMediaGroup()
quoteWithMediaGroup(
params):Promise<MessageContext<Bot>[]>
Defined in: contexts/index.d.ts:5020
Replies to current message with a quote and a media group
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendMediaGroupParams, "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "reply_parameters"> & object & object |
Returns
Promise<MessageContext<Bot>[]>
Inherited from
quoteWithPhoto()
quoteWithPhoto(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4992
Replies to current message with a quote and a photo
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendPhotoParams, "caption" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "caption_entities" | "show_caption_above_media" | "has_spoiler"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithPoll()
quoteWithPoll(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5035
Replies to current message with a quote and a poll
Parameters
| Parameter | Type |
|---|---|
params | object & Pick<SendPollParams, "question" | "options" | "type" | "explanation" | "business_connection_id" | "message_thread_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "reply_parameters" | "reply_markup" | "question_parse_mode" | "question_entities" | "is_anonymous" | "allows_multiple_answers" | "correct_option_id" | "explanation_parse_mode" | "explanation_entities" | "open_period" | "close_date" | "is_closed"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithSticker()
quoteWithSticker(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5037
Replies to current message with a quote and a sticker
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendStickerParams, "emoji" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithVenue()
quoteWithVenue(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5031
Replies to current message with a quote and a venue
Parameters
| Parameter | Type |
|---|---|
params | object & Pick<SendVenueParams, "title" | "address" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "latitude" | "longitude" | "foursquare_id" | "foursquare_type" | "google_place_id" | "google_place_type"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithVideo()
quoteWithVideo(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5004
Replies to current message with a quote and a video
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendVideoParams, "caption" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "caption_entities" | "show_caption_above_media" | "has_spoiler" | "thumbnail" | "duration" | "width" | "height" | "cover" | "start_timestamp" | "supports_streaming"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithVideoNote()
quoteWithVideoNote(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5012
Replies to current message with a quote and a video note
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendVideoNoteParams, "length" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "thumbnail" | "duration"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
quoteWithVoice()
quoteWithVoice(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:5016
Replies to current message with a quote and a voice
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendVoiceParams, "caption" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup" | "caption_entities" | "duration"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
react()
react(
rawReactions,params?):Promise<true>
Defined in: contexts/index.d.ts:5086
Reacts to a message
Parameters
| Parameter | Type |
|---|---|
rawReactions | MaybeArray<TelegramReactionTypeEmojiEmoji | TelegramReactionType> |
params? | Optional<SetMessageReactionParams, "chat_id" | "message_id"> |
Returns
Promise<true>
Inherited from
removeChatPhoto()
removeChatPhoto(
params?):Promise<true>
Defined in: contexts/index.d.ts:5102
Deletes a chat photo
Parameters
| Parameter | Type |
|---|---|
params? | Optional<DeleteChatPhotoParams, "chat_id"> |
Returns
Promise<true>
Inherited from
ChatControlMixin.removeChatPhoto
reply()
reply(
text,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4956
Replies to current message
Parameters
| Parameter | Type |
|---|---|
text | string | { toString: string; } |
params? | WithPartialReplyParameters<Optional<SendMessageParams, "text" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithAnimation()
replyWithAnimation(
animation,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4966
Replies to current message with animation
Parameters
| Parameter | Type |
|---|---|
animation | string | Blob |
params? | WithPartialReplyParameters<Optional<SendAnimationParams, "animation" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithAudio()
replyWithAudio(
audio,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4962
Replies to current message with audio
Parameters
| Parameter | Type |
|---|---|
audio | string | Blob |
params? | WithPartialReplyParameters<Optional<SendAudioParams, "audio" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithContact()
replyWithContact(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4980
Replies to current message with contact
Parameters
| Parameter | Type |
|---|---|
params | WithPartialReplyParameters<Optional<SendContactParams, "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithDice()
replyWithDice(
emoji,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4986
Replies to current message with a dice
Parameters
| Parameter | Type |
|---|---|
emoji | SendDiceEmoji |
params? | WithPartialReplyParameters<Partial<SendDiceParams>> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithDocument()
replyWithDocument(
document,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4960
Replies to current message with document
Parameters
| Parameter | Type |
|---|---|
document | string | Blob |
params? | WithPartialReplyParameters<Optional<SendDocumentParams, "document" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithInvoice()
replyWithInvoice(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4976
Replies to current message with invoice
Parameters
| Parameter | Type |
|---|---|
params | WithPartialReplyParameters<Optional<SendInvoiceParams, "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithLocation()
replyWithLocation(
latitude,longitude,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4974
Replies to current message with location
Parameters
| Parameter | Type |
|---|---|
latitude | number |
longitude | number |
params? | WithPartialReplyParameters<Optional<SendLocationParams, "chat_id" | "latitude" | "longitude">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithMediaGroup()
replyWithMediaGroup(
mediaGroup,params?):Promise<MessageContext<Bot>[]>
Defined in: contexts/index.d.ts:4972
Replies to current message with media group
Parameters
| Parameter | Type |
|---|---|
mediaGroup | (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaPhoto | TelegramInputMediaVideo)[] |
params? | WithPartialReplyParameters<Optional<SendMediaGroupParams, "chat_id" | "media">> |
Returns
Promise<MessageContext<Bot>[]>
Inherited from
replyWithPhoto()
replyWithPhoto(
photo,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4958
Replies to current message with photo
Parameters
| Parameter | Type |
|---|---|
photo | string | Blob |
params? | WithPartialReplyParameters<Optional<SendPhotoParams, "photo" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithPoll()
replyWithPoll(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4982
Replies to current message with poll
Parameters
| Parameter | Type |
|---|---|
params | WithPartialReplyParameters<Optional<SendPollParams, "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithQuote()
replyWithQuote(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4988
Replies to current message with a quote
Parameters
| Parameter | Type |
|---|---|
params | object & object & Pick<SendMessageParams, "entities" | "business_connection_id" | "message_thread_id" | "direct_messages_topic_id" | "parse_mode" | "link_preview_options" | "disable_notification" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "reply_parameters" | "reply_markup"> & object & object |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithSticker()
replyWithSticker(
sticker,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4984
Replies to current message with sticker
Parameters
| Parameter | Type |
|---|---|
sticker | string | Blob |
params? | WithPartialReplyParameters<Optional<SendStickerParams, "sticker" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithVenue()
replyWithVenue(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4978
Replies to current message with venue
Parameters
| Parameter | Type |
|---|---|
params | WithPartialReplyParameters<Optional<SendVenueParams, "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithVideo()
replyWithVideo(
video,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4964
Replies to current message with video
Parameters
| Parameter | Type |
|---|---|
video | string | Blob |
params? | WithPartialReplyParameters<Optional<SendVideoParams, "video" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithVideoNote()
replyWithVideoNote(
videoNote,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4968
Replies to current message with video note
Parameters
| Parameter | Type |
|---|---|
videoNote | string | Blob |
params? | WithPartialReplyParameters<Optional<SendVideoNoteParams, "video_note" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
replyWithVoice()
replyWithVoice(
voice,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4970
Replies to current message with voice
Parameters
| Parameter | Type |
|---|---|
voice | string | Blob |
params? | WithPartialReplyParameters<Optional<SendVoiceParams, "voice" | "chat_id">> |
Returns
Promise<MessageContext<Bot>>
Inherited from
restrictMember()
restrictMember(
permissions,params?):Promise<true>
Defined in: contexts/index.d.ts:5136
Restricts a user (O_O)
Parameters
| Parameter | Type |
|---|---|
permissions | TelegramChatPermissions |
params? | Optional<RestrictChatMemberParams, "chat_id" | "user_id"> |
Returns
Promise<true>
Inherited from
ChatMemberControlMixin.restrictMember
revokeInviteLink()
revokeInviteLink(
link,params?):Promise<TelegramChatInviteLink>
Defined in: contexts/index.d.ts:5124
Revokes an invite link generated by a bot
Parameters
| Parameter | Type |
|---|---|
link | string |
params? | Optional<RevokeChatInviteLinkParams, "chat_id" | "invite_link"> |
Returns
Promise<TelegramChatInviteLink>
Inherited from
ChatInviteControlMixin.revokeInviteLink
send()
send(
text,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4868
Sends message to current chat
Parameters
| Parameter | Type |
|---|---|
text | string | { toString: string; } |
params? | Optional<SendMessageParams, "text" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendAnimation()
sendAnimation(
animation,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4878
Sends animation to current chat
Parameters
| Parameter | Type |
|---|---|
animation | string | Blob |
params? | Optional<SendAnimationParams, "animation" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendAudio()
sendAudio(
audio,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4874
Sends audio to current chat
Parameters
| Parameter | Type |
|---|---|
audio | string | Blob |
params? | Optional<SendAudioParams, "audio" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendChatAction()
sendChatAction(
action,params?):Promise<true>
Defined in: contexts/index.d.ts:4902
Sends chat action to current chat
Parameters
| Parameter | Type |
|---|---|
action | SendChatActionAction |
params? | Optional<SendChatActionParams, "chat_id" | "action"> |
Returns
Promise<true>
Inherited from
sendChecklist()
sendChecklist(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4894
Sends checklist to current chat
Parameters
| Parameter | Type |
|---|---|
params | Optional<SendChecklistParams, "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendContact()
sendContact(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4890
Sends contact to current chat
Parameters
| Parameter | Type |
|---|---|
params | Optional<SendContactParams, "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendDice()
sendDice(
emoji,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4904
Sends dice
Parameters
| Parameter | Type |
|---|---|
emoji | SendDiceEmoji |
params? | Partial<SendDiceParams> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendDocument()
sendDocument(
document,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4872
Sends document to current chat
Parameters
| Parameter | Type |
|---|---|
document | string | Blob |
params? | Optional<SendDocumentParams, "document" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendInvoice()
sendInvoice(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4886
Sends invoice to current user
Parameters
| Parameter | Type |
|---|---|
params | Optional<SendInvoiceParams, "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendLocation()
sendLocation(
latitude,longitude,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4884
Sends location to current chat
Parameters
| Parameter | Type |
|---|---|
latitude | number |
longitude | number |
params? | Optional<SendLocationParams, "chat_id" | "latitude" | "longitude"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendMedia()
sendMedia<
T>(query):ReturnType<Textends"animation"? (animation,params?) =>Promise<MessageContext<Bot>> :Textends"audio"? (audio,params?) =>Promise<MessageContext<Bot>> :Textends"document"? (document,params?) =>Promise<MessageContext<Bot>> :Textends"photo"? (photo,params?) =>Promise<MessageContext<Bot>> :Textends"sticker"? (sticker,params?) =>Promise<MessageContext<Bot>> :Textends"video_note"? (videoNote,params?) =>Promise<MessageContext<Bot>> :Textends"video"? (video,params?) =>Promise<MessageContext<...>> :Textends"voice"? (voice,params?) =>Promise<...> : () =>never>
Defined in: contexts/index.d.ts:4921
Automatically uses correct media method to send media
Type Parameters
| Type Parameter |
|---|
T extends string |
Parameters
| Parameter | Type |
|---|---|
query | object & tSendMethods |
Returns
ReturnType<T extends "animation" ? (animation, params?) => Promise<MessageContext<Bot>> : T extends "audio" ? (audio, params?) => Promise<MessageContext<Bot>> : T extends "document" ? (document, params?) => Promise<MessageContext<Bot>> : T extends "photo" ? (photo, params?) => Promise<MessageContext<Bot>> : T extends "sticker" ? (sticker, params?) => Promise<MessageContext<Bot>> : T extends "video_note" ? (videoNote, params?) => Promise<MessageContext<Bot>> : T extends "video" ? (video, params?) => Promise<MessageContext<...>> : T extends "voice" ? (voice, params?) => Promise<...> : () => never>
Example
context.sendMedia({
type: 'photo',
photo: MediaUpload.path('./image.png'),
caption: 'good image yes yes'
})Inherited from
sendMediaGroup()
sendMediaGroup(
mediaGroup,params?):Promise<MessageContext<Bot>[]>
Defined in: contexts/index.d.ts:4908
Sends media group to current chat
Parameters
| Parameter | Type |
|---|---|
mediaGroup | (TelegramInputMediaAudio | TelegramInputMediaDocument | TelegramInputMediaPhoto | TelegramInputMediaVideo)[] |
params? | Optional<SendMediaGroupParams, "chat_id" | "media"> |
Returns
Promise<MessageContext<Bot>[]>
Inherited from
sendMessageDraft()
sendMessageDraft(
params):Promise<true>
Defined in: contexts/index.d.ts:4900
Sends a message draft to the current private chat
Parameters
| Parameter | Type |
|---|---|
params | Optional<SendMessageDraftParams, "chat_id"> |
Returns
Promise<true>
Inherited from
sendPaidMedia()
sendPaidMedia(
paidMedia,starCount,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4906
Sends paid media to current chat
Parameters
| Parameter | Type |
|---|---|
paidMedia | TelegramInputPaidMedia[] |
starCount | number |
params? | Optional<SendPaidMediaParams, "chat_id" | "media" | "star_count"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendPhoto()
sendPhoto(
photo,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4870
Sends photo to current chat
Parameters
| Parameter | Type |
|---|---|
photo | string | Blob |
params? | Optional<SendPhotoParams, "photo" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendPoll()
sendPoll(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4892
Sends poll to current chat
Parameters
| Parameter | Type |
|---|---|
params | Optional<SendPollParams, "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendSticker()
sendSticker(
sticker,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4896
Sends sticker
Parameters
| Parameter | Type |
|---|---|
sticker | string | Blob |
params? | Optional<SendStickerParams, "sticker" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendVenue()
sendVenue(
params):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4888
Sends venue to current chat
Parameters
| Parameter | Type |
|---|---|
params | Optional<SendVenueParams, "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendVideo()
sendVideo(
video,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4876
Sends video to current chat
Parameters
| Parameter | Type |
|---|---|
video | string | Blob |
params? | Optional<SendVideoParams, "video" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendVideoNote()
sendVideoNote(
videoNote,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4880
Sends video note to current chat
Parameters
| Parameter | Type |
|---|---|
videoNote | string | Blob |
params? | Optional<SendVideoNoteParams, "video_note" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
sendVoice()
sendVoice(
voice,params?):Promise<MessageContext<Bot>>
Defined in: contexts/index.d.ts:4882
Sends voice to current chat
Parameters
| Parameter | Type |
|---|---|
voice | string | Blob |
params? | Optional<SendVoiceParams, "voice" | "chat_id"> |
Returns
Promise<MessageContext<Bot>>
Inherited from
setChatDefaultPermissions()
setChatDefaultPermissions(
permissions,params?):Promise<true>
Defined in: contexts/index.d.ts:5098
Sets default chat permissions
Parameters
| Parameter | Type |
|---|---|
permissions | TelegramChatPermissions |
params? | Optional<SetChatPermissionsParams, "chat_id" | "permissions"> |
Returns
Promise<true>
Inherited from
ChatControlMixin.setChatDefaultPermissions
setChatDescription()
setChatDescription(
description,params?):Promise<true>
Defined in: contexts/index.d.ts:5106
Changes chat description
Parameters
| Parameter | Type |
|---|---|
description | string |
params? | Optional<SetChatDescriptionParams, "chat_id" | "description"> |
Returns
Promise<true>
Inherited from
ChatControlMixin.setChatDescription
setChatPhoto()
setChatPhoto(
photo,params?):Promise<true>
Defined in: contexts/index.d.ts:5100
Sets a new profile photo for the chat
Parameters
| Parameter | Type |
|---|---|
photo | Blob |
params? | Optional<SetChatPhotoParams, "photo" | "chat_id"> |
Returns
Promise<true>
Inherited from
setChatStickerSet()
setChatStickerSet(
name,params?):Promise<true>
Defined in: contexts/index.d.ts:5108
Sets new group stickerset
Parameters
| Parameter | Type |
|---|---|
name | string |
params? | Optional<SetChatStickerSetParams, "chat_id" | "sticker_set_name"> |
Returns
Promise<true>
Inherited from
ChatControlMixin.setChatStickerSet
setChatTitle()
setChatTitle(
title,params?):Promise<true>
Defined in: contexts/index.d.ts:5104
Changes chat title
Parameters
| Parameter | Type |
|---|---|
title | string |
params? | Optional<SetChatTitleParams, "title" | "chat_id"> |
Returns
Promise<true>
Inherited from
setCustomTitle()
setCustomTitle(
title,params?):Promise<true>
Defined in: contexts/index.d.ts:5096
Sets a custom title
Parameters
| Parameter | Type |
|---|---|
title | string |
params? | Optional<SetChatAdministratorCustomTitleParams, "chat_id" | "user_id"> |
Returns
Promise<true>
Inherited from
ChatControlMixin.setCustomTitle
setMemberTag()
setMemberTag(
tag,params?):Promise<true>
Defined in: contexts/index.d.ts:5140
Sets a tag for a regular member
Parameters
| Parameter | Type |
|---|---|
tag | string |
params? | Optional<SetChatMemberTagParams, "chat_id" | "user_id" | "tag"> |
Returns
Promise<true>
Inherited from
ChatMemberControlMixin.setMemberTag
setReaction()
setReaction(
reaction,params?):Promise<true>
Defined in: contexts/index.d.ts:5082
Sets a reaction on a message
Parameters
| Parameter | Type |
|---|---|
reaction | TelegramReactionTypeEmojiEmoji | TelegramReactionType |
params? | Optional<SetMessageReactionParams, "chat_id" | "message_id"> |
Returns
Promise<true>
Inherited from
setReactions()
setReactions(
rawReactions,params?):Promise<true>
Defined in: contexts/index.d.ts:5084
Sets multiple amount of reactions on a message
Parameters
| Parameter | Type |
|---|---|
rawReactions | (TelegramReactionTypeEmojiEmoji | TelegramReactionType)[] |
params? | Optional<SetMessageReactionParams, "chat_id" | "message_id"> |
Returns
Promise<true>
Inherited from
stopLiveLocation()
stopLiveLocation(
params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5055
Stops current message live location. An alias for stopMessageLiveLocation
Parameters
| Parameter | Type |
|---|---|
params? | StopMessageLiveLocationParams |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
stopMessageLiveLocation()
stopMessageLiveLocation(
params?):Promise<true|MessageContext<Bot>>
Defined in: contexts/index.d.ts:5053
Stops current message live location
Parameters
| Parameter | Type |
|---|---|
params? | StopMessageLiveLocationParams |
Returns
Promise<true | MessageContext<Bot>>
Inherited from
NodeMixin.stopMessageLiveLocation
stopPoll()
stopPoll(
messageId,params?):Promise<Poll>
Defined in: contexts/index.d.ts:4898
Stops poll in current chat
Parameters
| Parameter | Type |
|---|---|
messageId | number |
params? | Partial<StopPollParams> |
Returns
Promise<Poll>
Inherited from
streamMessage()
streamMessage(
stream,options?):Promise<MessageContext<Bot>[]>
Defined in: contexts/index.d.ts:4936
Streams message drafts to the current chat, finalizing each completed draft as a sent message.
Accepts an Iterable or AsyncIterable of MessageDraftPiece (strings or objects with text+entities). Uses sendMessageDraft for live typing previews and sendMessage to finalize each 4096-char segment. Returns an array of sent MessageContext objects.
Parameters
| Parameter | Type |
|---|---|
stream | Iterable<MessageDraftPiece, any, any> | AsyncIterable<MessageDraftPiece, any, any> |
options? | StreamMessageOptions |
Returns
Promise<MessageContext<Bot>[]>
Example
// Stream from an async generator (e.g., LLM output)
const messages = await context.streamMessage(llmStream);Inherited from
unbanChatSender()
unbanChatSender(
senderChatId,params?):Promise<true>
Defined in: contexts/index.d.ts:5150
Unbans a channel chat
Parameters
| Parameter | Type |
|---|---|
senderChatId | number |
params? | Optional<UnbanChatSenderChatParams, "chat_id" | "sender_chat_id"> |
Returns
Promise<true>
Inherited from
ChatSenderControlMixin.unbanChatSender
unbanMember()
unbanMember(
params?):Promise<true>
Defined in: contexts/index.d.ts:5134
Unbans a user (O_o)
Parameters
| Parameter | Type |
|---|---|
params? | Optional<UnbanChatMemberParams, "chat_id" | "user_id"> |
Returns
Promise<true>
Inherited from
ChatMemberControlMixin.unbanMember
unpinAllChatMessages()
unpinAllChatMessages(
params?):Promise<true>
Defined in: contexts/index.d.ts:5199
Clears the list of pinned messages
Parameters
| Parameter | Type |
|---|---|
params? | Optional<UnpinAllChatMessagesParams, "chat_id"> |
Returns
Promise<true>
Inherited from
PinsMixin.unpinAllChatMessages
unpinChatMessage()
unpinChatMessage(
params?):Promise<true>
Defined in: contexts/index.d.ts:5197
Removes message from the list of pinned messages
Parameters
| Parameter | Type |
|---|---|
params? | Optional<UnpinChatMessageParams, "chat_id" | "message_id"> |
Returns
Promise<true>