Interface WizardContext<D> interface WizardContext < D > { botInfo : UserFromGetMe ; scene : SceneContextScene < WizardContext < D > , D > ; session : WizardSession < D > ; state : Record < string | symbol , any > ; telegram : Telegram ; update : Update ; wizard : WizardContextWizard < WizardContext < D > > ; get callbackQuery (): PropOr < U , "callback_query" > ; get channelPost (): PropOr < U , "channel_post" > ; get chat (): PropOr < GetUpdateContent < U > , "chat" , undefined > ; get chatBoost (): PropOr < U , "chat_boost" > ; get chatJoinRequest (): PropOr < U , "chat_join_request" > ; get chatMember (): PropOr < U , "chat_member" > ; get chosenInlineResult (): PropOr < U , "chosen_inline_result" > ; get editedChannelPost (): PropOr < U , "edited_channel_post" > ; get editedMessage (): PropOr < U , "edited_message" > ; get from (): GetUserFromAnySource < U > ; get inlineMessageId (): undefined | string ; get inlineQuery (): PropOr < U , "inline_query" > ; get kickChatMember (): ( ( ... args ) => Promise < true > ) ; get me (): string ; get message (): PropOr < U , "message" > ; get messageReaction (): PropOr < U , "message_reaction" > ; get messageReactionCount (): PropOr < U , "message_reaction_count" > ; get msg (): GetMsg < U > & Msg ; get msgId (): GetMsgId < U > ; get myChatMember (): PropOr < U , "my_chat_member" > ; get passportData (): undefined | PassportData ; get poll (): PropOr < U , "poll" > ; get pollAnswer (): PropOr < U , "poll_answer" > ; get preCheckoutQuery (): PropOr < U , "pre_checkout_query" > ; get reactions (): MessageReactions ; get removedChatBoost (): PropOr < U , "removed_chat_boost" > ; get senderChat (): PropOr < GetUpdateContent < U > , "sender_chat" , undefined > ; get shippingQuery (): PropOr < U , "shipping_query" > ; get text (): GetText < U > ; get tg (): Telegram ; get updateType (): Extract < UnionKeys < U > , UpdateType > ; get webAppData (): undefined | { button_text : string ; data : { json < T > ( ) : T ; text ( ) : string ; } ; } ; webhookReply : boolean ; addStickerToSet ( ... args ) : Promise < true > ; answerCbQuery ( ... args ) : Promise < true > ; answerGameQuery ( ... args ) : Promise < true > ; answerInlineQuery ( ... args ) : Promise < true > ; answerPreCheckoutQuery ( ... args ) : Promise < true > ; answerShippingQuery ( ... args ) : Promise < true > ; approveChatJoinRequest ( userId ) : Promise < true > ; banChatMember ( ... args ) : Promise < true > ; banChatSenderChat ( senderChatId ) : Promise < true > ; closeForumTopic ( ) : Promise < true > ; closeGeneralForumTopic ( ) : Promise < true > ; copyMessage ( chatId ,
extra ? ) : Promise < MessageId > ; copyMessages ( chatId ,
messageIds ,
extra ? ) : Promise < MessageId [] > ; createChatInviteLink ( ... args ) : Promise < ChatInviteLink > ; createForumTopic ( ... args ) : Promise < ForumTopic > ; createNewStickerSet ( ... args ) : Promise < true > ; declineChatJoinRequest ( userId ) : Promise < true > ; deleteChatPhoto ( ... args ) : Promise < true > ; deleteChatStickerSet ( ) : Promise < true > ; deleteForumTopic ( ) : Promise < true > ; deleteMessage ( messageId ? ) : Promise < true > ; deleteMessages ( messageIds ) : Promise < true > ; deleteStickerFromSet ( sticker ) : Promise < true > ; deleteStickerSet ( ... args ) : Promise < true > ; editChatInviteLink ( ... args ) : Promise < ChatInviteLink > ; editForumTopic ( extra ) : Promise < true > ; editGeneralForumTopic ( name ) : Promise < true > ; editMessageCaption ( caption ,
extra ? ) : Promise < true | Edited & CaptionableMessage & BusinessSentMessage > ; editMessageLiveLocation ( latitude ,
longitude ,
extra ? ) : Promise < true | Edited & LocationMessage & BusinessSentMessage > ; editMessageMedia ( media ,
extra ? ) : Promise < true | ( Edited & (Message & BusinessSentMessage)
) > ; editMessageReplyMarkup ( markup ) : Promise < true | ( Edited & (Message & BusinessSentMessage)
) > ; editMessageText ( text ,
extra ? ) : Promise < true | Edited & TextMessage & BusinessSentMessage > ; entities < EntityTypes > ( ... types ) : ( MessageEntity & { fragment : string ; type : SelectedTypes ; } ) [] ; exportChatInviteLink ( ... args ) : Promise < string > ; forwardMessage ( chatId ,
extra ? ) : Promise < Message & BusinessSentMessage > ; forwardMessages ( chatId ,
messageIds ,
extra ? ) : Promise < MessageId [] > ; getChat ( ... args ) : Promise < ChatFullInfo > ; getChatAdministrators ( ... args ) : Promise < ( ChatMemberOwner | ChatMemberAdministrator ) [] > ; getChatMember ( ... args ) : Promise < ChatMember > ; getChatMembersCount ( ... args ) : Promise < number > ; getChatMenuButton ( ) : Promise < MenuButton > ; getMyCommands ( ) : Promise < BotCommand [] > ; getMyDefaultAdministratorRights ( extra ? ) : Promise < ChatAdministratorRights > ; getStickerSet ( setName ) : Promise < StickerSet > ; getUserChatBoosts ( ) : Promise < UserChatBoosts > ; has < Filter > ( filters ) : this is FilteredContext < Context < Update > , Filter > ; hideGeneralForumTopic ( ) : Promise < true > ; leaveChat ( ... args ) : Promise < true > ; persistentChatAction ( action ,
callback ,
extra ? ) : Promise < void > ; pinChatMessage ( ... args ) : Promise < true > ; promoteChatMember ( ... args ) : Promise < true > ; react ( reaction ? ,
is_big ? ) : Promise < true > ; reopenForumTopic ( ) : Promise < true > ; reopenGeneralForumTopic ( ) : Promise < true > ; reply ( ... args ) : Promise < TextMessage & BusinessSentMessage > ; replyWithAnimation ( ... args ) : Promise < AnimationMessage & BusinessSentMessage > ; replyWithAudio ( ... args ) : Promise < AudioMessage & BusinessSentMessage > ; replyWithChatAction ( ... args ) : Promise < true > ; replyWithContact ( ... args ) : Promise < ContactMessage & BusinessSentMessage > ; replyWithDice ( ... args ) : Promise < DiceMessage & BusinessSentMessage > ; replyWithDocument ( ... args ) : Promise < DocumentMessage & BusinessSentMessage > ; replyWithGame ( ... args ) : Promise < GameMessage & BusinessSentMessage > ; replyWithHTML ( html ,
extra ? ) : Promise < TextMessage & BusinessSentMessage > ; replyWithInvoice ( ... args ) : Promise < InvoiceMessage & BusinessSentMessage > ; replyWithLocation ( ... args ) : Promise < LocationMessage & BusinessSentMessage > ; replyWithMarkdown ( markdown ,
extra ? ) : Promise < TextMessage & BusinessSentMessage > ; replyWithMarkdownV2 ( markdown ,
extra ? ) : Promise < TextMessage & BusinessSentMessage > ; replyWithMediaGroup ( ... args ) : Promise < ( ( DocumentMessage | AudioMessage | PhotoMessage | VideoMessage ) & BusinessSentMessage ) [] > ; replyWithPhoto ( ... args ) : Promise < PhotoMessage & BusinessSentMessage > ; replyWithPoll ( ... args ) : Promise < PollMessage & BusinessSentMessage > ; replyWithQuiz ( ... args ) : Promise < PollMessage & BusinessSentMessage > ; replyWithSticker ( ... args ) : Promise < StickerMessage & BusinessSentMessage > ; replyWithVenue ( ... args ) : Promise < VenueMessage & BusinessSentMessage > ; replyWithVideo ( ... args ) : Promise < VideoMessage & BusinessSentMessage > ; replyWithVideoNote ( ... args ) : Promise < VideoNoteMessage & BusinessSentMessage > ; replyWithVoice ( ... args ) : Promise < VoiceMessage & BusinessSentMessage > ; restrictChatMember ( ... args ) : Promise < true > ; revokeChatInviteLink ( ... args ) : Promise < ChatInviteLink > ; sendAnimation ( animation ,
extra ? ) : Promise < AnimationMessage & BusinessSentMessage > ; sendAudio ( audio ,
extra ? ) : Promise < AudioMessage & BusinessSentMessage > ; sendChatAction ( action ,
extra ? ) : Promise < true > ; sendContact ( phoneNumber ,
firstName ,
extra ? ) : Promise < ContactMessage & BusinessSentMessage > ; sendDice ( extra ? ) : Promise < DiceMessage & BusinessSentMessage > ; sendDocument ( document ,
extra ? ) : Promise < DocumentMessage & BusinessSentMessage > ; sendGame ( game ,
extra ? ) : Promise < GameMessage & BusinessSentMessage > ; sendInvoice ( invoice ,
extra ? ) : Promise < InvoiceMessage & BusinessSentMessage > ; sendLocation ( latitude ,
longitude ,
extra ? ) : Promise < LocationMessage & BusinessSentMessage > ; sendMediaGroup ( media ,
extra ? ) : Promise < ( ( DocumentMessage | AudioMessage | PhotoMessage | VideoMessage ) & BusinessSentMessage ) [] > ; sendMessage ( text ,
extra ? ) : Promise < TextMessage & BusinessSentMessage > ; sendPhoto ( photo ,
extra ? ) : Promise < PhotoMessage & BusinessSentMessage > ; sendPoll ( poll ,
options ,
extra ? ) : Promise < PollMessage & BusinessSentMessage > ; sendQuiz ( quiz ,
options ,
extra ? ) : Promise < PollMessage & BusinessSentMessage > ; sendSticker ( sticker ,
extra ? ) : Promise < StickerMessage & BusinessSentMessage > ; sendVenue ( latitude ,
longitude ,
title ,
address ,
extra ? ) : Promise < VenueMessage & BusinessSentMessage > ; sendVideo ( video ,
extra ? ) : Promise < VideoMessage & BusinessSentMessage > ; sendVideoNote ( videoNote ,
extra ? ) : Promise < VideoNoteMessage & BusinessSentMessage > ; sendVoice ( voice ,
extra ? ) : Promise < VoiceMessage & BusinessSentMessage > ; setChatAdministratorCustomTitle ( ... args ) : Promise < true > ; setChatDescription ( ... args ) : Promise < true > ; setChatMenuButton ( menuButton ? ) : Promise < true > ; setChatPermissions ( ... args ) : Promise < true > ; setChatPhoto ( ... args ) : Promise < true > ; setChatStickerSet ( setName ) : Promise < true > ; setChatTitle ( ... args ) : Promise < true > ; setCustomEmojiStickerSetThumbnail ( ... args ) : Promise < true > ; setMyCommands ( commands ) : Promise < true > ; setMyDefaultAdministratorRights ( extra ? ) : Promise < true > ; setPassportDataErrors ( errors ) : Promise < true > ; setStickerEmojiList ( ... args ) : Promise < true > ; setStickerKeywords ( ... args ) : Promise < true > ; setStickerMaskPosition ( ... args ) : Promise < true > ; setStickerPositionInSet ( sticker ,
position ) : Promise < true > ; setStickerSetThumb ( ... args ) : Promise < true > ; setStickerSetThumbnail ( ... args ) : Promise < true > ; setStickerSetTitle ( ... args ) : Promise < true > ; stopMessageLiveLocation ( markup ? ) : Promise < true | Edited & LocationMessage & BusinessSentMessage > ; stopPoll ( ... args ) : Promise < Poll > ; unbanChatMember ( ... args ) : Promise < true > ; unbanChatSenderChat ( senderChatId ) : Promise < true > ; unhideGeneralForumTopic ( ) : Promise < true > ; unpinAllChatMessages ( ... args ) : Promise < true > ; unpinAllForumTopicMessages ( ) : Promise < true > ; unpinAllGeneralForumTopicMessages ( ) : Promise < true > ; unpinChatMessage ( ... args ) : Promise < true > ; uploadStickerFile ( ... args ) : Promise < File > ; } Properties Readonly bot Info bot Info : UserFromGetMe
Readonly state state : Record < string | symbol , any > = {}
Readonly update update : Update
Accessors callback Query get callbackQuery( ) : PropOr < U , "callback_query" > Returns PropOr < U , "callback_query" > channel Post get channelPost( ) : PropOr < U , "channel_post" > Returns PropOr < U , "channel_post" > chat get chat( ) : PropOr < GetUpdateContent < U > , "chat" , undefined > Returns PropOr < GetUpdateContent < U > , "chat" , undefined > chat Boost get chatBoost( ) : PropOr < U , "chat_boost" > Returns PropOr < U , "chat_boost" > chat Join Request get chatJoinRequest( ) : PropOr < U , "chat_join_request" > Returns PropOr < U , "chat_join_request" > chat Member get chatMember( ) : PropOr < U , "chat_member" > Returns PropOr < U , "chat_member" > chosen Inline Result get chosenInlineResult( ) : PropOr < U , "chosen_inline_result" > Returns PropOr < U , "chosen_inline_result" > edited Channel Post get editedChannelPost( ) : PropOr < U , "edited_channel_post" > Returns PropOr < U , "edited_channel_post" > edited Message get editedMessage( ) : PropOr < U , "edited_message" > Returns PropOr < U , "edited_message" > from get from( ) : GetUserFromAnySource < U > Returns GetUserFromAnySource < U > inline Message Id get inlineMessageId( ) : undefined | string Returns undefined | string inline Query get inlineQuery( ) : PropOr < U , "inline_query" > Returns PropOr < U , "inline_query" > kick Chat Member get kickChatMember( ) : ( ( ... args ) => Promise < true > ) Returns ( ( ... args ) => Promise < true > ) ( ... args ) : Promise < true > Parameters Rest ... args : [ userId: number , untilDate?: number , extra?: Omit < {} , "chat_id" | "user_id" | "until_date" > ] Returns Promise < true > me get me( ) : string Returns string message get message( ) : PropOr < U , "message" > Returns PropOr < U , "message" > message Reaction get messageReaction( ) : PropOr < U , "message_reaction" > Returns PropOr < U , "message_reaction" > message Reaction Count get messageReactionCount( ) : PropOr < U , "message_reaction_count" > Returns PropOr < U , "message_reaction_count" > msg get msg( ) : GetMsg < U > & Msg Returns GetMsg < U > & Msg msg Id get msgId( ) : GetMsgId < U > Returns GetMsgId < U > my Chat Member get myChatMember( ) : PropOr < U , "my_chat_member" > Returns PropOr < U , "my_chat_member" > passport Data get passportData( ) : undefined | PassportData Returns undefined | PassportData poll get poll( ) : PropOr < U , "poll" > Returns PropOr < U , "poll" > poll Answer get pollAnswer( ) : PropOr < U , "poll_answer" > Returns PropOr < U , "poll_answer" > pre Checkout Query get preCheckoutQuery( ) : PropOr < U , "pre_checkout_query" > Returns PropOr < U , "pre_checkout_query" > reactions get reactions( ) : MessageReactions Returns MessageReactions removed Chat Boost get removedChatBoost( ) : PropOr < U , "removed_chat_boost" > Returns PropOr < U , "removed_chat_boost" > sender Chat get senderChat( ) : PropOr < GetUpdateContent < U > , "sender_chat" , undefined > Returns PropOr < GetUpdateContent < U > , "sender_chat" , undefined > shipping Query get shippingQuery( ) : PropOr < U , "shipping_query" > Returns PropOr < U , "shipping_query" > text get text( ) : GetText < U > Returns GetText < U > web App Data get webAppData( ) : undefined | { button_text : string ; data : { json < T > ( ) : T ; text ( ) : string ; } ; } Returns undefined | { button_text : string ; data : { json < T > ( ) : T ; text ( ) : string ; } ; } webhook Reply get webhookReply( ) : boolean Returns boolean set webhookReply( enable ) : void Returns void Methods add Sticker To Set add Sticker To Set ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string , stickerData: Omit < {} , "chat_id" | "name" | "user_id" > ] Returns Promise < true > answer Cb Query answer Cb Query ( ... args ) : Promise < true > Parameters Rest ... args : [ text?: string , extra?: Omit < {} , "text" | "chat_id" | "callback_query_id" > ] Returns Promise < true > answer Game Query answer Game Query ( ... args ) : Promise < true > Parameters Rest ... args : [ url: string ] Returns Promise < true > answer Inline Query answer Inline Query ( ... args ) : Promise < true > Parameters Rest ... args : [ results: readonly InlineQueryResult [] , extra?: Omit < {} , "chat_id" | "inline_query_id" | "results" > ] Returns Promise < true > answer Pre Checkout Query answer Pre Checkout Query ( ... args ) : Promise < true > Parameters Rest ... args : [ ok: boolean , errorMessage?: string ] Returns Promise < true > answer Shipping Query answer Shipping Query ( ... args ) : Promise < true > Parameters Rest ... args : [ ok: boolean , shippingOptions: readonly ShippingOption [] , errorMessage: string ] Returns Promise < true > approve Chat Join Request approve Chat Join Request ( userId ) : Promise < true > Returns Promise < true > ban Chat Member ban Chat Member ( ... args ) : Promise < true > Parameters Rest ... args : [ userId: number , untilDate?: number , extra?: Omit < {} , "chat_id" | "user_id" | "until_date" > ] Returns Promise < true > ban Chat Sender Chat ban Chat Sender Chat ( senderChatId ) : Promise < true > Returns Promise < true > close Forum Topic close Forum Topic ( ) : Promise < true > Returns Promise < true > close General Forum Topic close General Forum Topic ( ) : Promise < true > Returns Promise < true > copy Message copy Message ( chatId , extra ? ) : Promise < MessageId > Parameters chatId : string | number Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < MessageId > copy Messages copy Messages ( chatId , messageIds , extra ? ) : Promise < MessageId [] > Parameters chatId : string | number messageIds : number [] Optional extra : Omit < {} , "chat_id" | "from_chat_id" | "message_ids" > Returns Promise < MessageId [] > create Chat Invite Link create Chat Invite Link ( ... args ) : Promise < ChatInviteLink > Parameters Rest ... args : [ extra?: Omit < {} , "chat_id" > ] Returns Promise < ChatInviteLink > create Forum Topic create Forum Topic ( ... args ) : Promise < ForumTopic > Parameters Rest ... args : [ name: string , extra?: Omit < {} , "chat_id" | "name" > ] Returns Promise < ForumTopic > create New Sticker Set create New Sticker Set ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string , title: string , stickerData: Omit < {} , "chat_id" | "name" | "user_id" | "title" > ] Returns Promise < true > decline Chat Join Request decline Chat Join Request ( userId ) : Promise < true > Returns Promise < true > delete Chat Photo delete Chat Photo ( ... args ) : Promise < true > Returns Promise < true > delete Chat Sticker Set delete Chat Sticker Set ( ) : Promise < true > Returns Promise < true > delete Forum Topic delete Forum Topic ( ) : Promise < true > Returns Promise < true > delete Message delete Message ( messageId ? ) : Promise < true > Parameters Optional messageId : number Returns Promise < true > delete Messages delete Messages ( messageIds ) : Promise < true > Returns Promise < true > delete Sticker From Set delete Sticker From Set ( sticker ) : Promise < true > Returns Promise < true > delete Sticker Set delete Sticker Set ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string ] Returns Promise < true > edit Chat Invite Link edit Chat Invite Link ( ... args ) : Promise < ChatInviteLink > Parameters Rest ... args : [ inviteLink: string , extra?: Omit < {} , "chat_id" | "invite_link" > ] Returns Promise < ChatInviteLink > edit Forum Topic edit Forum Topic ( extra ) : Promise < true > Parameters extra : Omit < {} , "chat_id" | "message_thread_id" > Returns Promise < true > edit General Forum Topic edit General Forum Topic ( name ) : Promise < true > Returns Promise < true > edit Message Caption edit Message Caption ( caption , extra ? ) : Promise < true | Edited & CaptionableMessage & BusinessSentMessage > Parameters caption : undefined | string | FmtString < string > Optional extra : Omit < {} , "caption" | "chat_id" | "message_id" | "inline_message_id" > Returns Promise < true | Edited & CaptionableMessage & BusinessSentMessage > edit Message Live Location edit Message Live Location ( latitude , longitude , extra ? ) : Promise < true | Edited & LocationMessage & BusinessSentMessage > Parameters latitude : number longitude : number Optional extra : Omit < {} , "chat_id" | "message_id" | "inline_message_id" | "latitude" | "longitude" > Returns Promise < true | Edited & LocationMessage & BusinessSentMessage > edit Message Media edit Message Media ( media , extra ? ) : Promise < true | ( Edited & (Message & BusinessSentMessage)) > Parameters media : { caption ?: string | FmtString < string > ; } | { caption ?: string | FmtString < string > ; } | { caption ?: string | FmtString < string > ; } | { caption ?: string | FmtString < string > ; } | { caption ?: string | FmtString < string > ; } Optional extra : Omit < {} , "chat_id" | "message_id" | "inline_message_id" | "media" > Returns Promise < true | ( Edited & (Message & BusinessSentMessage)) > edit Message Reply Markup edit Message Reply Markup ( markup ) : Promise < true | ( Edited & (Message & BusinessSentMessage)) > Parameters markup : undefined | InlineKeyboardMarkup Returns Promise < true | ( Edited & (Message & BusinessSentMessage)) > edit Message Text edit Message Text ( text , extra ? ) : Promise < true | Edited & TextMessage & BusinessSentMessage > Parameters text : string | FmtString < string > Optional extra : Omit < {} , "text" | "chat_id" | "message_id" | "inline_message_id" > Returns Promise < true | Edited & TextMessage & BusinessSentMessage > entities entities < EntityTypes > ( ... types ) : ( MessageEntity & { fragment : string ; type : SelectedTypes ; } ) [] Type Parameters EntityTypes extends ( "url" | "mention" | "hashtag" | "cashtag" | "bot_command" | "email" | "phone_number" | "bold" | "blockquote" | "expandable_blockquote" | "italic" | "underline" | "strikethrough" | "spoiler" | "code" | "pre" | "text_link" | "text_mention" | "custom_emoji" ) [] Returns ( MessageEntity & { fragment : string ; type : SelectedTypes ; } ) [] export Chat Invite Link export Chat Invite Link ( ... args ) : Promise < string > Returns Promise < string > forward Message forward Message ( chatId , extra ? ) : Promise < Message & BusinessSentMessage > Parameters chatId : string | number Optional extra : Omit < {} , "chat_id" | "from_chat_id" | "message_id" > Returns Promise < Message & BusinessSentMessage > forward Messages forward Messages ( chatId , messageIds , extra ? ) : Promise < MessageId [] > Parameters chatId : string | number messageIds : number [] Optional extra : Omit < {} , "chat_id" | "from_chat_id" | "message_ids" > Returns Promise < MessageId [] > get Chat get Chat ( ... args ) : Promise < ChatFullInfo > Returns Promise < ChatFullInfo > get Chat Administrators get Chat Administrators ( ... args ) : Promise < ( ChatMemberOwner | ChatMemberAdministrator ) [] > Returns Promise < ( ChatMemberOwner | ChatMemberAdministrator ) [] > get Chat Member get Chat Member ( ... args ) : Promise < ChatMember > Parameters Rest ... args : [ userId: number ] Returns Promise < ChatMember > get Chat Members Count get Chat Members Count ( ... args ) : Promise < number > Returns Promise < number > get Chat Menu Button get Chat Menu Button ( ) : Promise < MenuButton > Returns Promise < MenuButton > get My Commands get My Commands ( ) : Promise < BotCommand [] > Returns Promise < BotCommand [] > get My Default Administrator Rights get My Default Administrator Rights ( extra ? ) : Promise < ChatAdministratorRights > Parameters Optional extra : { forChannels ?: boolean ; } Optional for Channels ?: boolean Returns Promise < ChatAdministratorRights > get Sticker Set get Sticker Set ( setName ) : Promise < StickerSet > Returns Promise < StickerSet > get User Chat Boosts get User Chat Boosts ( ) : Promise < UserChatBoosts > Returns Promise < UserChatBoosts > hide General Forum Topic hide General Forum Topic ( ) : Promise < true > Returns Promise < true > leave Chat leave Chat ( ... args ) : Promise < true > Returns Promise < true > persistent Chat Action persistent Chat Action ( action , callback , extra ? ) : Promise < void > Parameters action : "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note" callback : ( ( ) => Promise < void > ) ( ) : Promise < void > Returns Promise < void > extra : Omit < {} , "action" | "chat_id" > & { intervalDuration ?: number ; } = {} Returns Promise < void > pin Chat Message pin Chat Message ( ... args ) : Promise < true > Parameters Rest ... args : [ messageId: number , extra?: { disable_notification ?: boolean ; } ] Returns Promise < true > promote Chat Member promote Chat Member ( ... args ) : Promise < true > Parameters Rest ... args : [ userId: number , extra: Omit < {} , "chat_id" | "user_id" > ] Returns Promise < true > react react ( reaction ? , is_big ? ) : Promise < true > Parameters Optional reaction : MaybeArray < ( ReactionType | TelegramEmoji | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `9${string}`) > Optional is_big : boolean Returns Promise < true > reopen Forum Topic reopen Forum Topic ( ) : Promise < true > Returns Promise < true > reopen General Forum Topic reopen General Forum Topic ( ) : Promise < true > Returns Promise < true > reply reply ( ... args ) : Promise < TextMessage & BusinessSentMessage > Parameters Rest ... args : [ text: string | FmtString < string > , extra?: Omit < {} , "text" | "chat_id" > ] Returns Promise < TextMessage & BusinessSentMessage > reply With Animation reply With Animation ( ... args ) : Promise < AnimationMessage & BusinessSentMessage > Parameters Rest ... args : [ animation: string | InputFile , extra?: { caption ?: string | FmtString < string > ; } ] Returns Promise < AnimationMessage & BusinessSentMessage > reply With Audio reply With Audio ( ... args ) : Promise < AudioMessage & BusinessSentMessage > Parameters Rest ... args : [ audio: string | InputFile , extra?: { caption ?: string | FmtString < string > ; } ] Returns Promise < AudioMessage & BusinessSentMessage > reply With Chat Action reply With Chat Action ( ... args ) : Promise < true > Parameters Rest ... args : [ action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note" , extra?: Omit < {} , "action" | "chat_id" > ] Returns Promise < true > reply With Contact reply With Contact ( ... args ) : Promise < ContactMessage & BusinessSentMessage > Parameters Rest ... args : [ phoneNumber: string , firstName: string , extra?: Omit < {} , "phone_number" | "chat_id" | "first_name" > ] Returns Promise < ContactMessage & BusinessSentMessage > reply With Dice reply With Dice ( ... args ) : Promise < DiceMessage & BusinessSentMessage > Parameters Rest ... args : [ extra?: Omit < {} , "chat_id" > ] Returns Promise < DiceMessage & BusinessSentMessage > reply With Document reply With Document ( ... args ) : Promise < DocumentMessage & BusinessSentMessage > Parameters Rest ... args : [ document: string | InputFile , extra?: { caption ?: string | FmtString < string > ; } ] Returns Promise < DocumentMessage & BusinessSentMessage > reply With Game reply With Game ( ... args ) : Promise < GameMessage & BusinessSentMessage > Parameters Rest ... args : [ gameName: string , extra?: Omit < {} , "chat_id" | "game_short_name" > ] Returns Promise < GameMessage & BusinessSentMessage > reply WithHTML reply WithHTML ( html , extra ? ) : Promise < TextMessage & BusinessSentMessage > Parameters html : string Optional extra : Omit < {} , "text" | "chat_id" > Returns Promise < TextMessage & BusinessSentMessage > reply With Invoice reply With Invoice ( ... args ) : Promise < InvoiceMessage & BusinessSentMessage > Parameters Rest ... args : [ invoice: Omit < {} , "chat_id" | "message_thread_id" | "disable_notification" | "reply_parameters" | "reply_markup" > , extra?: Omit < {} , "chat_id" | "direct_messages_topic_id" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "title" | "description" | "payload" | "provider_token" | "currency" | "prices" | "max_tip_amount" | "suggested_tip_amounts" | "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" | "start_parameter" > ] Returns Promise < InvoiceMessage & BusinessSentMessage > reply With Location reply With Location ( ... args ) : Promise < LocationMessage & BusinessSentMessage > Parameters Rest ... args : [ latitude: number , longitude: number , extra?: Omit < {} , "chat_id" | "latitude" | "longitude" > ] Returns Promise < LocationMessage & BusinessSentMessage > reply With Markdown reply With Markdown ( markdown , extra ? ) : Promise < TextMessage & BusinessSentMessage > Parameters markdown : string Optional extra : Omit < {} , "text" | "chat_id" > Returns Promise < TextMessage & BusinessSentMessage > reply With Markdown V2 reply With Markdown V2 ( markdown , extra ? ) : Promise < TextMessage & BusinessSentMessage > Parameters markdown : string Optional extra : Omit < {} , "text" | "chat_id" > Returns Promise < TextMessage & BusinessSentMessage > reply With Media Group reply With Media Group ( ... args ) : Promise < ( ( DocumentMessage | AudioMessage | PhotoMessage | VideoMessage ) & BusinessSentMessage ) [] > Parameters Rest ... args : [ media: MediaGroup , extra?: Omit < {} , "chat_id" | "media" > ] Returns Promise < ( ( DocumentMessage | AudioMessage | PhotoMessage | VideoMessage ) & BusinessSentMessage ) [] > reply With Photo reply With Photo ( ... args ) : Promise < PhotoMessage & BusinessSentMessage > Parameters Rest ... args : [ photo: string | InputFile , extra?: { caption ?: string | FmtString < string > ; } ] Returns Promise < PhotoMessage & BusinessSentMessage > reply With Poll reply With Poll ( ... args ) : Promise < PollMessage & BusinessSentMessage > Parameters Rest ... args : [ question: string , options: readonly InputPollOption [] , extra?: Omit < {} , "type" | "chat_id" | "question" | "options" > ] Returns Promise < PollMessage & BusinessSentMessage > reply With Quiz reply With Quiz ( ... args ) : Promise < PollMessage & BusinessSentMessage > Parameters Rest ... args : [ question: string , options: readonly InputPollOption [] , extra?: Omit < {} , "type" | "chat_id" | "question" | "options" > ] Returns Promise < PollMessage & BusinessSentMessage > reply With Sticker reply With Sticker ( ... args ) : Promise < StickerMessage & BusinessSentMessage > Parameters Rest ... args : [ sticker: string | InputFile , extra?: Omit < {} , "chat_id" | "sticker" > ] Returns Promise < StickerMessage & BusinessSentMessage > reply With Venue reply With Venue ( ... args ) : Promise < VenueMessage & BusinessSentMessage > Parameters Rest ... args : [ latitude: number , longitude: number , title: string , address: string , extra?: Omit < {} , "chat_id" | "title" | "latitude" | "longitude" | "address" > ] Returns Promise < VenueMessage & BusinessSentMessage > reply With Video reply With Video ( ... args ) : Promise < VideoMessage & BusinessSentMessage > Parameters Rest ... args : [ video: string | InputFile , extra?: { caption ?: string | FmtString < string > ; } ] Returns Promise < VideoMessage & BusinessSentMessage > reply With Video Note reply With Video Note ( ... args ) : Promise < VideoNoteMessage & BusinessSentMessage > Parameters Rest ... args : [ videoNote: string | InputFileVideoNote , extra?: Omit < {} , "chat_id" | "video_note" > ] Returns Promise < VideoNoteMessage & BusinessSentMessage > reply With Voice reply With Voice ( ... args ) : Promise < VoiceMessage & BusinessSentMessage > Parameters Rest ... args : [ voice: string | InputFile , extra?: { caption ?: string | FmtString < string > ; } ] Returns Promise < VoiceMessage & BusinessSentMessage > restrict Chat Member restrict Chat Member ( ... args ) : Promise < true > Parameters Rest ... args : [ userId: number , extra: Omit < {} , "chat_id" | "user_id" > ] Returns Promise < true > revoke Chat Invite Link revoke Chat Invite Link ( ... args ) : Promise < ChatInviteLink > Parameters Rest ... args : [ inviteLink: string ] Returns Promise < ChatInviteLink > send Animation send Animation ( animation , extra ? ) : Promise < AnimationMessage & BusinessSentMessage > Parameters animation : string | InputFile Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < AnimationMessage & BusinessSentMessage > send Audio send Audio ( audio , extra ? ) : Promise < AudioMessage & BusinessSentMessage > Parameters audio : string | InputFile Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < AudioMessage & BusinessSentMessage > send Chat Action send Chat Action ( action , extra ? ) : Promise < true > Parameters action : "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note" Optional extra : Omit < {} , "action" | "chat_id" > Returns Promise < true > send Contact send Contact ( phoneNumber , firstName , extra ? ) : Promise < ContactMessage & BusinessSentMessage > Parameters phoneNumber : string firstName : string Optional extra : Omit < {} , "phone_number" | "chat_id" | "first_name" > Returns Promise < ContactMessage & BusinessSentMessage > send Dice send Dice ( extra ? ) : Promise < DiceMessage & BusinessSentMessage > Parameters Optional extra : Omit < {} , "chat_id" > Returns Promise < DiceMessage & BusinessSentMessage > send Document send Document ( document , extra ? ) : Promise < DocumentMessage & BusinessSentMessage > Parameters document : string | InputFile Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < DocumentMessage & BusinessSentMessage > send Game send Game ( game , extra ? ) : Promise < GameMessage & BusinessSentMessage > Parameters game : string Optional extra : Omit < {} , "chat_id" | "game_short_name" > Returns Promise < GameMessage & BusinessSentMessage > send Invoice send Invoice ( invoice , extra ? ) : Promise < InvoiceMessage & BusinessSentMessage > Parameters invoice : Omit < {} , "chat_id" | "message_thread_id" | "disable_notification" | "reply_parameters" | "reply_markup" > Optional extra : Omit < {} , "chat_id" | "direct_messages_topic_id" | "protect_content" | "allow_paid_broadcast" | "message_effect_id" | "suggested_post_parameters" | "title" | "description" | "payload" | "provider_token" | "currency" | "prices" | "max_tip_amount" | "suggested_tip_amounts" | "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" | "start_parameter" > Returns Promise < InvoiceMessage & BusinessSentMessage > send Location send Location ( latitude , longitude , extra ? ) : Promise < LocationMessage & BusinessSentMessage > Parameters latitude : number longitude : number Optional extra : Omit < {} , "chat_id" | "latitude" | "longitude" > Returns Promise < LocationMessage & BusinessSentMessage > send Media Group send Media Group ( media , extra ? ) : Promise < ( ( DocumentMessage | AudioMessage | PhotoMessage | VideoMessage ) & BusinessSentMessage ) [] > Parameters media : MediaGroup Optional extra : Omit < {} , "chat_id" | "media" > Returns Promise < ( ( DocumentMessage | AudioMessage | PhotoMessage | VideoMessage ) & BusinessSentMessage ) [] > send Message send Message ( text , extra ? ) : Promise < TextMessage & BusinessSentMessage > Parameters text : string | FmtString < string > Optional extra : Omit < {} , "text" | "chat_id" > Returns Promise < TextMessage & BusinessSentMessage > send Photo send Photo ( photo , extra ? ) : Promise < PhotoMessage & BusinessSentMessage > Parameters photo : string | InputFile Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < PhotoMessage & BusinessSentMessage > send Poll send Poll ( poll , options , extra ? ) : Promise < PollMessage & BusinessSentMessage > Parameters poll : string options : readonly InputPollOption [] Optional extra : Omit < {} , "type" | "chat_id" | "question" | "options" > Returns Promise < PollMessage & BusinessSentMessage > send Quiz send Quiz ( quiz , options , extra ? ) : Promise < PollMessage & BusinessSentMessage > Parameters quiz : string options : readonly InputPollOption [] Optional extra : Omit < {} , "type" | "chat_id" | "question" | "options" > Returns Promise < PollMessage & BusinessSentMessage > send Sticker send Sticker ( sticker , extra ? ) : Promise < StickerMessage & BusinessSentMessage > Parameters sticker : string | InputFile Optional extra : Omit < {} , "chat_id" | "sticker" > Returns Promise < StickerMessage & BusinessSentMessage > send Venue send Venue ( latitude , longitude , title , address , extra ? ) : Promise < VenueMessage & BusinessSentMessage > Parameters latitude : number longitude : number title : string address : string Optional extra : Omit < {} , "chat_id" | "title" | "latitude" | "longitude" | "address" > Returns Promise < VenueMessage & BusinessSentMessage > send Video send Video ( video , extra ? ) : Promise < VideoMessage & BusinessSentMessage > Parameters video : string | InputFile Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < VideoMessage & BusinessSentMessage > send Video Note send Video Note ( videoNote , extra ? ) : Promise < VideoNoteMessage & BusinessSentMessage > Parameters videoNote : string | InputFileVideoNote Optional extra : Omit < {} , "chat_id" | "video_note" > Returns Promise < VideoNoteMessage & BusinessSentMessage > send Voice send Voice ( voice , extra ? ) : Promise < VoiceMessage & BusinessSentMessage > Parameters voice : string | InputFile Optional extra : { caption ?: string | FmtString < string > ; } Optional caption ?: string | FmtString < string > Returns Promise < VoiceMessage & BusinessSentMessage > set Chat Administrator Custom Title set Chat Administrator Custom Title ( ... args ) : Promise < true > Parameters Rest ... args : [ userId: number , title: string ] Returns Promise < true > set Chat Description set Chat Description ( ... args ) : Promise < true > Parameters Rest ... args : [ description?: string ] Returns Promise < true > set Chat Menu Button set Chat Menu Button ( menuButton ? ) : Promise < true > Parameters Optional menuButton : MenuButton Returns Promise < true > set Chat Permissions set Chat Permissions ( ... args ) : Promise < true > Parameters Rest ... args : [ permissions: ChatPermissions , extra?: Omit < {} , "chat_id" | "permissions" > ] Returns Promise < true > set Chat Photo set Chat Photo ( ... args ) : Promise < true > Parameters Rest ... args : [ photo: InputFile ] Returns Promise < true > set Chat Sticker Set set Chat Sticker Set ( setName ) : Promise < true > Returns Promise < true > set Chat Title set Chat Title ( ... args ) : Promise < true > Parameters Rest ... args : [ title: string ] Returns Promise < true > set Custom Emoji Sticker Set Thumbnail set Custom Emoji Sticker Set Thumbnail ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string , custom_emoji_id: string ] Returns Promise < true > set My Commands set My Commands ( commands ) : Promise < true > Parameters commands : readonly BotCommand [] Returns Promise < true > set My Default Administrator Rights set My Default Administrator Rights ( extra ? ) : Promise < true > Parameters Optional extra : { forChannels ?: boolean ; rights ?: ChatAdministratorRights ; } Optional for Channels ?: boolean Optional rights ?: ChatAdministratorRights Returns Promise < true > set Passport Data Errors set Passport Data Errors ( errors ) : Promise < true > Parameters errors : readonly PassportElementError [] Returns Promise < true > set Sticker Emoji List set Sticker Emoji List ( ... args ) : Promise < true > Parameters Rest ... args : [ sticker: string , emoji_list: string [] ] Returns Promise < true > set Sticker Keywords set Sticker Keywords ( ... args ) : Promise < true > Parameters Rest ... args : [ sticker: string , keywords?: string [] ] Returns Promise < true > set Sticker Mask Position set Sticker Mask Position ( ... args ) : Promise < true > Parameters Rest ... args : [ sticker: string , mask_position?: MaskPosition ] Returns Promise < true > set Sticker Position In Set set Sticker Position In Set ( sticker , position ) : Promise < true > Parameters sticker : string position : number Returns Promise < true > set Sticker Set Thumb set Sticker Set Thumb ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string , userId: number , thumbnail?: string | InputFile , format: "video" | "static" | "animated" ] Returns Promise < true > set Sticker Set Thumbnail set Sticker Set Thumbnail ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string , userId: number , thumbnail?: string | InputFile , format: "video" | "static" | "animated" ] Returns Promise < true > set Sticker Set Title set Sticker Set Title ( ... args ) : Promise < true > Parameters Rest ... args : [ name: string , title: string ] Returns Promise < true > stop Message Live Location stop Message Live Location ( markup ? ) : Promise < true | Edited & LocationMessage & BusinessSentMessage > Parameters Optional markup : InlineKeyboardMarkup Returns Promise < true | Edited & LocationMessage & BusinessSentMessage > stop Poll stop Poll ( ... args ) : Promise < Poll > Parameters Rest ... args : [ messageId: number , extra?: Omit < {} , "chat_id" | "message_id" > ] Returns Promise < Poll > unban Chat Member unban Chat Member ( ... args ) : Promise < true > Parameters Rest ... args : [ userId: number , extra?: { only_if_banned ?: boolean ; } ] Returns Promise < true > unban Chat Sender Chat unban Chat Sender Chat ( senderChatId ) : Promise < true > Returns Promise < true > unhide General Forum Topic unhide General Forum Topic ( ) : Promise < true > Returns Promise < true > unpin All Chat Messages unpin All Chat Messages ( ... args ) : Promise < true > Returns Promise < true > unpin All Forum Topic Messages unpin All Forum Topic Messages ( ) : Promise < true > Returns Promise < true > unpin All General Forum Topic Messages unpin All General Forum Topic Messages ( ) : Promise < true > Returns Promise < true > unpin Chat Message unpin Chat Message ( ... args ) : Promise < true > Parameters Rest ... args : [ messageId?: number ] Returns Promise < true > upload Sticker File upload Sticker File ( ... args ) : Promise < File > Parameters Rest ... args : [ sticker: InputFile , sticker_format: "video" | "static" | "animated" ] Returns Promise < File >
See
https://core.telegram.org/bots/api#banchatmember
Deprecated
since API 5.3. Use Context.banChatMember