Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WizardContext<D>

Type parameters

Hierarchy

Index

Properties

Readonly botInfo

botInfo: UserFromGetMe

scene

session

session: WizardSession<D>

Readonly state

state: Record<string | symbol, any> = ...

Readonly tg

tg: Telegram

Readonly update

update: Update

wizard

Accessors

callbackQuery

  • get callbackQuery(): undefined | DataCallbackQuery | GameShortGameCallbackQuery
  • Returns undefined | DataCallbackQuery | GameShortGameCallbackQuery

channelPost

  • get channelPost(): undefined | (New & Channel & TextMessage) | (New & Channel & DocumentMessage) | (New & Channel & AudioMessage) | (New & Channel & ChannelChatCreatedMessage) | (New & Channel & ConnectedWebsiteMessage) | (New & Channel & ContactMessage) | (New & Channel & DeleteChatPhotoMessage) | (New & Channel & DiceMessage) | (New & Channel & GameMessage) | (New & Channel & GroupChatCreatedMessage) | (New & Channel & InvoiceMessage) | (New & Channel & LeftChatMemberMessage) | (New & Channel & LocationMessage) | (New & Channel & MigrateFromChatIdMessage) | (New & Channel & MigrateToChatIdMessage) | (New & Channel & NewChatMembersMessage) | (New & Channel & NewChatPhotoMessage) | (New & Channel & NewChatTitleMessage) | (New & Channel & PassportDataMessage) | (New & Channel & ProximityAlertTriggeredMessage) | (New & Channel & PhotoMessage) | (New & Channel & PinnedMessageMessage) | (New & Channel & PollMessage) | (New & Channel & StickerMessage) | (New & Channel & SuccessfulPaymentMessage) | (New & Channel & SupergroupChatCreated) | (New & Channel & VideoMessage) | (New & Channel & VideoNoteMessage) | (New & Channel & VoiceMessage)
  • Returns undefined | (New & Channel & TextMessage) | (New & Channel & DocumentMessage) | (New & Channel & AudioMessage) | (New & Channel & ChannelChatCreatedMessage) | (New & Channel & ConnectedWebsiteMessage) | (New & Channel & ContactMessage) | (New & Channel & DeleteChatPhotoMessage) | (New & Channel & DiceMessage) | (New & Channel & GameMessage) | (New & Channel & GroupChatCreatedMessage) | (New & Channel & InvoiceMessage) | (New & Channel & LeftChatMemberMessage) | (New & Channel & LocationMessage) | (New & Channel & MigrateFromChatIdMessage) | (New & Channel & MigrateToChatIdMessage) | (New & Channel & NewChatMembersMessage) | (New & Channel & NewChatPhotoMessage) | (New & Channel & NewChatTitleMessage) | (New & Channel & PassportDataMessage) | (New & Channel & ProximityAlertTriggeredMessage) | (New & Channel & PhotoMessage) | (New & Channel & PinnedMessageMessage) | (New & Channel & PollMessage) | (New & Channel & StickerMessage) | (New & Channel & SuccessfulPaymentMessage) | (New & Channel & SupergroupChatCreated) | (New & Channel & VideoMessage) | (New & Channel & VideoNoteMessage) | (New & Channel & VoiceMessage)

chat

  • get chat(): undefined | PrivateChat | GroupChat | SupergroupChat | ChannelChat
  • Returns undefined | PrivateChat | GroupChat | SupergroupChat | ChannelChat

chosenInlineResult

  • get chosenInlineResult(): undefined | ChosenInlineResult

editedChannelPost

  • get editedChannelPost(): undefined | (Edited & Channel & TextMessage) | (Edited & Channel & DocumentMessage) | (Edited & Channel & AudioMessage) | (Edited & Channel & ChannelChatCreatedMessage) | (Edited & Channel & ConnectedWebsiteMessage) | (Edited & Channel & ContactMessage) | (Edited & Channel & DeleteChatPhotoMessage) | (Edited & Channel & DiceMessage) | (Edited & Channel & GameMessage) | (Edited & Channel & GroupChatCreatedMessage) | (Edited & Channel & InvoiceMessage) | (Edited & Channel & LeftChatMemberMessage) | (Edited & Channel & LocationMessage) | (Edited & Channel & MigrateFromChatIdMessage) | (Edited & Channel & MigrateToChatIdMessage) | (Edited & Channel & NewChatMembersMessage) | (Edited & Channel & NewChatPhotoMessage) | (Edited & Channel & NewChatTitleMessage) | (Edited & Channel & PassportDataMessage) | (Edited & Channel & ProximityAlertTriggeredMessage) | (Edited & Channel & PhotoMessage) | (Edited & Channel & PinnedMessageMessage) | (Edited & Channel & PollMessage) | (Edited & Channel & StickerMessage) | (Edited & Channel & SuccessfulPaymentMessage) | (Edited & Channel & SupergroupChatCreated) | (Edited & Channel & VideoMessage) | (Edited & Channel & VideoNoteMessage) | (Edited & Channel & VoiceMessage)
  • Returns undefined | (Edited & Channel & TextMessage) | (Edited & Channel & DocumentMessage) | (Edited & Channel & AudioMessage) | (Edited & Channel & ChannelChatCreatedMessage) | (Edited & Channel & ConnectedWebsiteMessage) | (Edited & Channel & ContactMessage) | (Edited & Channel & DeleteChatPhotoMessage) | (Edited & Channel & DiceMessage) | (Edited & Channel & GameMessage) | (Edited & Channel & GroupChatCreatedMessage) | (Edited & Channel & InvoiceMessage) | (Edited & Channel & LeftChatMemberMessage) | (Edited & Channel & LocationMessage) | (Edited & Channel & MigrateFromChatIdMessage) | (Edited & Channel & MigrateToChatIdMessage) | (Edited & Channel & NewChatMembersMessage) | (Edited & Channel & NewChatPhotoMessage) | (Edited & Channel & NewChatTitleMessage) | (Edited & Channel & PassportDataMessage) | (Edited & Channel & ProximityAlertTriggeredMessage) | (Edited & Channel & PhotoMessage) | (Edited & Channel & PinnedMessageMessage) | (Edited & Channel & PollMessage) | (Edited & Channel & StickerMessage) | (Edited & Channel & SuccessfulPaymentMessage) | (Edited & Channel & SupergroupChatCreated) | (Edited & Channel & VideoMessage) | (Edited & Channel & VideoNoteMessage) | (Edited & Channel & VoiceMessage)

editedMessage

  • get editedMessage(): undefined | (Edited & NonChannel & TextMessage) | (Edited & NonChannel & DocumentMessage) | (Edited & NonChannel & AudioMessage) | (Edited & NonChannel & ChannelChatCreatedMessage) | (Edited & NonChannel & ConnectedWebsiteMessage) | (Edited & NonChannel & ContactMessage) | (Edited & NonChannel & DeleteChatPhotoMessage) | (Edited & NonChannel & DiceMessage) | (Edited & NonChannel & GameMessage) | (Edited & NonChannel & GroupChatCreatedMessage) | (Edited & NonChannel & InvoiceMessage) | (Edited & NonChannel & LeftChatMemberMessage) | (Edited & NonChannel & LocationMessage) | (Edited & NonChannel & MigrateFromChatIdMessage) | (Edited & NonChannel & MigrateToChatIdMessage) | (Edited & NonChannel & NewChatMembersMessage) | (Edited & NonChannel & NewChatPhotoMessage) | (Edited & NonChannel & NewChatTitleMessage) | (Edited & NonChannel & PassportDataMessage) | (Edited & NonChannel & ProximityAlertTriggeredMessage) | (Edited & NonChannel & PhotoMessage) | (Edited & NonChannel & PinnedMessageMessage) | (Edited & NonChannel & PollMessage) | (Edited & NonChannel & StickerMessage) | (Edited & NonChannel & SuccessfulPaymentMessage) | (Edited & NonChannel & SupergroupChatCreated) | (Edited & NonChannel & VideoMessage) | (Edited & NonChannel & VideoNoteMessage) | (Edited & NonChannel & VoiceMessage)
  • Returns undefined | (Edited & NonChannel & TextMessage) | (Edited & NonChannel & DocumentMessage) | (Edited & NonChannel & AudioMessage) | (Edited & NonChannel & ChannelChatCreatedMessage) | (Edited & NonChannel & ConnectedWebsiteMessage) | (Edited & NonChannel & ContactMessage) | (Edited & NonChannel & DeleteChatPhotoMessage) | (Edited & NonChannel & DiceMessage) | (Edited & NonChannel & GameMessage) | (Edited & NonChannel & GroupChatCreatedMessage) | (Edited & NonChannel & InvoiceMessage) | (Edited & NonChannel & LeftChatMemberMessage) | (Edited & NonChannel & LocationMessage) | (Edited & NonChannel & MigrateFromChatIdMessage) | (Edited & NonChannel & MigrateToChatIdMessage) | (Edited & NonChannel & NewChatMembersMessage) | (Edited & NonChannel & NewChatPhotoMessage) | (Edited & NonChannel & NewChatTitleMessage) | (Edited & NonChannel & PassportDataMessage) | (Edited & NonChannel & ProximityAlertTriggeredMessage) | (Edited & NonChannel & PhotoMessage) | (Edited & NonChannel & PinnedMessageMessage) | (Edited & NonChannel & PollMessage) | (Edited & NonChannel & StickerMessage) | (Edited & NonChannel & SuccessfulPaymentMessage) | (Edited & NonChannel & SupergroupChatCreated) | (Edited & NonChannel & VideoMessage) | (Edited & NonChannel & VideoNoteMessage) | (Edited & NonChannel & VoiceMessage)

from

  • get from(): undefined | User

inlineMessageId

  • get inlineMessageId(): undefined | string

inlineQuery

  • get inlineQuery(): undefined | InlineQuery

me

  • get me(): string

message

  • get message(): undefined | (New & NonChannel & TextMessage) | (New & NonChannel & DocumentMessage) | (New & NonChannel & AudioMessage) | (New & NonChannel & ChannelChatCreatedMessage) | (New & NonChannel & ConnectedWebsiteMessage) | (New & NonChannel & ContactMessage) | (New & NonChannel & DeleteChatPhotoMessage) | (New & NonChannel & DiceMessage) | (New & NonChannel & GameMessage) | (New & NonChannel & GroupChatCreatedMessage) | (New & NonChannel & InvoiceMessage) | (New & NonChannel & LeftChatMemberMessage) | (New & NonChannel & LocationMessage) | (New & NonChannel & MigrateFromChatIdMessage) | (New & NonChannel & MigrateToChatIdMessage) | (New & NonChannel & NewChatMembersMessage) | (New & NonChannel & NewChatPhotoMessage) | (New & NonChannel & NewChatTitleMessage) | (New & NonChannel & PassportDataMessage) | (New & NonChannel & ProximityAlertTriggeredMessage) | (New & NonChannel & PhotoMessage) | (New & NonChannel & PinnedMessageMessage) | (New & NonChannel & PollMessage) | (New & NonChannel & StickerMessage) | (New & NonChannel & SuccessfulPaymentMessage) | (New & NonChannel & SupergroupChatCreated) | (New & NonChannel & VideoMessage) | (New & NonChannel & VideoNoteMessage) | (New & NonChannel & VoiceMessage)
  • Returns undefined | (New & NonChannel & TextMessage) | (New & NonChannel & DocumentMessage) | (New & NonChannel & AudioMessage) | (New & NonChannel & ChannelChatCreatedMessage) | (New & NonChannel & ConnectedWebsiteMessage) | (New & NonChannel & ContactMessage) | (New & NonChannel & DeleteChatPhotoMessage) | (New & NonChannel & DiceMessage) | (New & NonChannel & GameMessage) | (New & NonChannel & GroupChatCreatedMessage) | (New & NonChannel & InvoiceMessage) | (New & NonChannel & LeftChatMemberMessage) | (New & NonChannel & LocationMessage) | (New & NonChannel & MigrateFromChatIdMessage) | (New & NonChannel & MigrateToChatIdMessage) | (New & NonChannel & NewChatMembersMessage) | (New & NonChannel & NewChatPhotoMessage) | (New & NonChannel & NewChatTitleMessage) | (New & NonChannel & PassportDataMessage) | (New & NonChannel & ProximityAlertTriggeredMessage) | (New & NonChannel & PhotoMessage) | (New & NonChannel & PinnedMessageMessage) | (New & NonChannel & PollMessage) | (New & NonChannel & StickerMessage) | (New & NonChannel & SuccessfulPaymentMessage) | (New & NonChannel & SupergroupChatCreated) | (New & NonChannel & VideoMessage) | (New & NonChannel & VideoNoteMessage) | (New & NonChannel & VoiceMessage)

passportData

  • get passportData(): undefined | PassportData

poll

  • get poll(): undefined | Poll

pollAnswer

  • get pollAnswer(): undefined | PollAnswer

preCheckoutQuery

  • get preCheckoutQuery(): undefined | PreCheckoutQuery

senderChat

  • get senderChat(): undefined | PrivateChat | GroupChat | SupergroupChat | ChannelChat
  • Returns undefined | PrivateChat | GroupChat | SupergroupChat | ChannelChat

shippingQuery

  • get shippingQuery(): undefined | ShippingQuery

telegram

  • get telegram(): Telegram

updateType

  • get updateType(): undefined | "callback_query" | "channel_post" | "chosen_inline_result" | "edited_channel_post" | "edited_message" | "inline_query" | "message" | "pre_checkout_query" | "shipping_query" | "poll" | "poll_answer"
  • Returns undefined | "callback_query" | "channel_post" | "chosen_inline_result" | "edited_channel_post" | "edited_message" | "inline_query" | "message" | "pre_checkout_query" | "shipping_query" | "poll" | "poll_answer"

webhookReply

  • get webhookReply(): boolean
  • set webhookReply(enable: boolean): void
  • deprecated

    use ctx.telegram.webhookReply

    Returns boolean

  • Parameters

    • enable: boolean

    Returns void

Methods

addStickerToSet

  • addStickerToSet(...args: [name: string, stickerData: Pick<{}, "png_sticker" | "tgs_sticker" | "emojis" | "mask_position">]): Promise<true>
  • Parameters

    • Rest ...args: [name: string, stickerData: Pick<{}, "png_sticker" | "tgs_sticker" | "emojis" | "mask_position">]

    Returns Promise<true>

answerCbQuery

  • answerCbQuery(...args: [text?: string, extra?: Pick<{}, "cache_time" | "show_alert" | "url">]): Promise<true>
  • Parameters

    • Rest ...args: [text?: string, extra?: Pick<{}, "cache_time" | "show_alert" | "url">]

    Returns Promise<true>

answerGameQuery

  • answerGameQuery(...args: [url: string]): Promise<true>

answerInlineQuery

  • answerInlineQuery(...args: [results: readonly InlineQueryResult[], extra?: Pick<{}, "cache_time" | "is_personal" | "next_offset" | "switch_pm_text" | "switch_pm_parameter">]): Promise<true>
  • Parameters

    • Rest ...args: [results: readonly InlineQueryResult[], extra?: Pick<{}, "cache_time" | "is_personal" | "next_offset" | "switch_pm_text" | "switch_pm_parameter">]

    Returns Promise<true>

answerPreCheckoutQuery

  • answerPreCheckoutQuery(...args: [ok: boolean, errorMessage?: string]): Promise<true>

answerShippingQuery

  • answerShippingQuery(...args: [ok: boolean, shippingOptions: readonly ShippingOption[], errorMessage: string]): Promise<true>

copyMessage

  • copyMessage(chatId: string | number, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities">): Promise<MessageId>
  • Parameters

    • chatId: string | number
    • Optional extra: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities">

    Returns Promise<MessageId>

createNewStickerSet

  • createNewStickerSet(...args: [name: string, title: string, stickerData: Pick<{}, "png_sticker" | "tgs_sticker" | "emojis" | "contains_masks" | "mask_position">]): Promise<true>
  • Parameters

    • Rest ...args: [name: string, title: string, stickerData: Pick<{}, "png_sticker" | "tgs_sticker" | "emojis" | "contains_masks" | "mask_position">]

    Returns Promise<true>

deleteChatPhoto

  • deleteChatPhoto(...args: []): Promise<true>

deleteChatStickerSet

  • deleteChatStickerSet(): Promise<true>

deleteMessage

  • deleteMessage(messageId?: number): Promise<true>

deleteStickerFromSet

  • deleteStickerFromSet(sticker: string): Promise<true>

editMessageCaption

  • editMessageCaption(caption: undefined | string, extra?: Pick<{}, "parse_mode" | "reply_markup">): Promise<true | (Edited & CaptionableMessage)>
  • Parameters

    • caption: undefined | string
    • Optional extra: Pick<{}, "parse_mode" | "reply_markup">

    Returns Promise<true | (Edited & CaptionableMessage)>

editMessageLiveLocation

  • editMessageLiveLocation(latitude: number, longitude: number, extra?: Pick<{}, "reply_markup" | "horizontal_accuracy" | "heading" | "proximity_alert_radius">): Promise<true | (Edited & LocationMessage)>
  • Parameters

    • latitude: number
    • longitude: number
    • Optional extra: Pick<{}, "reply_markup" | "horizontal_accuracy" | "heading" | "proximity_alert_radius">

    Returns Promise<true | (Edited & LocationMessage)>

editMessageMedia

  • editMessageMedia(media: {} | {} | {} | {} | {}, extra?: Pick<{}, "reply_markup">): Promise<true | (Edited & AnimationMessage) | (Edited & AudioMessage) | (Edited & DocumentMessage) | (Edited & PhotoMessage) | (Edited & VideoMessage)>
  • Parameters

    • media: {} | {} | {} | {} | {}
    • Optional extra: Pick<{}, "reply_markup">

    Returns Promise<true | (Edited & AnimationMessage) | (Edited & AudioMessage) | (Edited & DocumentMessage) | (Edited & PhotoMessage) | (Edited & VideoMessage)>

editMessageReplyMarkup

  • editMessageReplyMarkup(markup: undefined | InlineKeyboardMarkup): Promise<true | (Edited & LocationMessage) | (Edited & TextMessage) | (Edited & AnimationMessage) | (Edited & AudioMessage) | (Edited & DocumentMessage) | (Edited & PhotoMessage) | (Edited & VideoMessage) | (Edited & ChannelChatCreatedMessage) | (Edited & ConnectedWebsiteMessage) | (Edited & ContactMessage) | (Edited & DeleteChatPhotoMessage) | (Edited & DiceMessage) | (Edited & GameMessage) | (Edited & GroupChatCreatedMessage) | (Edited & InvoiceMessage) | (Edited & LeftChatMemberMessage) | (Edited & MigrateFromChatIdMessage) | (Edited & MigrateToChatIdMessage) | (Edited & NewChatMembersMessage) | (Edited & NewChatPhotoMessage) | (Edited & NewChatTitleMessage) | (Edited & PassportDataMessage) | (Edited & ProximityAlertTriggeredMessage) | (Edited & PinnedMessageMessage) | (Edited & PollMessage) | (Edited & StickerMessage) | (Edited & SuccessfulPaymentMessage) | (Edited & SupergroupChatCreated) | (Edited & VenueMessage) | (Edited & VideoNoteMessage) | (Edited & VoiceMessage)>
  • Parameters

    • markup: undefined | InlineKeyboardMarkup

    Returns Promise<true | (Edited & LocationMessage) | (Edited & TextMessage) | (Edited & AnimationMessage) | (Edited & AudioMessage) | (Edited & DocumentMessage) | (Edited & PhotoMessage) | (Edited & VideoMessage) | (Edited & ChannelChatCreatedMessage) | (Edited & ConnectedWebsiteMessage) | (Edited & ContactMessage) | (Edited & DeleteChatPhotoMessage) | (Edited & DiceMessage) | (Edited & GameMessage) | (Edited & GroupChatCreatedMessage) | (Edited & InvoiceMessage) | (Edited & LeftChatMemberMessage) | (Edited & MigrateFromChatIdMessage) | (Edited & MigrateToChatIdMessage) | (Edited & NewChatMembersMessage) | (Edited & NewChatPhotoMessage) | (Edited & NewChatTitleMessage) | (Edited & PassportDataMessage) | (Edited & ProximityAlertTriggeredMessage) | (Edited & PinnedMessageMessage) | (Edited & PollMessage) | (Edited & StickerMessage) | (Edited & SuccessfulPaymentMessage) | (Edited & SupergroupChatCreated) | (Edited & VenueMessage) | (Edited & VideoNoteMessage) | (Edited & VoiceMessage)>

editMessageText

  • editMessageText(text: string, extra?: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "reply_markup">): Promise<true | (Edited & TextMessage)>
  • Parameters

    • text: string
    • Optional extra: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "reply_markup">

    Returns Promise<true | (Edited & TextMessage)>

exportChatInviteLink

  • exportChatInviteLink(...args: []): Promise<string>

forwardMessage

  • forwardMessage(chatId: string | number, extra?: { disable_notification?: undefined | boolean }): Promise<Message>
  • Parameters

    • chatId: string | number
    • Optional extra: { disable_notification?: undefined | boolean }
      • Optional disable_notification?: undefined | boolean

    Returns Promise<Message>

getChat

  • getChat(...args: []): Promise<ChatFromGetChat>

getChatAdministrators

  • getChatAdministrators(...args: []): Promise<ChatMember[]>

getChatMember

  • getChatMember(...args: [userId: number]): Promise<ChatMember>

getChatMembersCount

  • getChatMembersCount(...args: []): Promise<number>

getMyCommands

  • getMyCommands(): Promise<BotCommand[]>

getStickerSet

  • getStickerSet(setName: string): Promise<StickerSet>

kickChatMember

  • kickChatMember(...args: [userId: number, untilDate?: number]): Promise<true>

leaveChat

  • leaveChat(...args: []): Promise<true>

pinChatMessage

  • pinChatMessage(...args: [messageId: number, extra?: { disable_notification?: undefined | boolean }]): Promise<true>
  • Parameters

    • Rest ...args: [messageId: number, extra?: { disable_notification?: undefined | boolean }]

    Returns Promise<true>

promoteChatMember

  • promoteChatMember(...args: [userId: number, extra: Pick<{}, "is_anonymous" | "can_change_info" | "can_post_messages" | "can_edit_messages" | "can_delete_messages" | "can_invite_users" | "can_restrict_members" | "can_pin_messages" | "can_promote_members">]): Promise<true>
  • Parameters

    • Rest ...args: [userId: number, extra: Pick<{}, "is_anonymous" | "can_change_info" | "can_post_messages" | "can_edit_messages" | "can_delete_messages" | "can_invite_users" | "can_restrict_members" | "can_pin_messages" | "can_promote_members">]

    Returns Promise<true>

reply

  • reply(...args: [text: string, extra?: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]): Promise<TextMessage>
  • Parameters

    • Rest ...args: [text: string, extra?: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]

    Returns Promise<TextMessage>

replyWithAnimation

  • replyWithAnimation(...args: [animation: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration" | "thumb" | "width" | "height">]): Promise<AnimationMessage>
  • Parameters

    • Rest ...args: [animation: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration" | "thumb" | "width" | "height">]

    Returns Promise<AnimationMessage>

replyWithAudio

  • replyWithAudio(...args: [audio: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration" | "performer" | "title" | "thumb">]): Promise<AudioMessage>
  • Parameters

    • Rest ...args: [audio: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration" | "performer" | "title" | "thumb">]

    Returns Promise<AudioMessage>

replyWithChatAction

  • replyWithChatAction(...args: [action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "find_location" | "record_video_note" | "upload_video_note"]): Promise<true>
  • Parameters

    • Rest ...args: [action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "find_location" | "record_video_note" | "upload_video_note"]

    Returns Promise<true>

replyWithContact

  • replyWithContact(...args: [phoneNumber: string, firstName: string, extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "last_name" | "vcard">]): Promise<ContactMessage>
  • Parameters

    • Rest ...args: [phoneNumber: string, firstName: string, extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "last_name" | "vcard">]

    Returns Promise<ContactMessage>

replyWithDice

  • replyWithDice(...args: [extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "emoji">]): Promise<DiceMessage>
  • Parameters

    • Rest ...args: [extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "emoji">]

    Returns Promise<DiceMessage>

replyWithDocument

  • replyWithDocument(...args: [document: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "thumb" | "disable_content_type_detection">]): Promise<DocumentMessage>
  • Parameters

    • Rest ...args: [document: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "thumb" | "disable_content_type_detection">]

    Returns Promise<DocumentMessage>

replyWithGame

  • replyWithGame(...args: [gameName: string, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]): Promise<GameMessage>
  • Parameters

    • Rest ...args: [gameName: string, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]

    Returns Promise<GameMessage>

replyWithHTML

  • replyWithHTML(html: string, extra?: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">): Promise<TextMessage>
  • Parameters

    • html: string
    • Optional extra: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">

    Returns Promise<TextMessage>

replyWithInvoice

  • replyWithInvoice(...args: [invoice: Pick<{}, "title" | "description" | "payload" | "provider_token" | "start_parameter" | "currency" | "prices" | "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">, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]): Promise<InvoiceMessage>
  • Parameters

    • Rest ...args: [invoice: Pick<{}, "title" | "description" | "payload" | "provider_token" | "start_parameter" | "currency" | "prices" | "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">, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]

    Returns Promise<InvoiceMessage>

replyWithLocation

  • replyWithLocation(...args: [latitude: number, longitude: number, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "horizontal_accuracy" | "heading" | "proximity_alert_radius" | "live_period">]): Promise<LocationMessage>
  • Parameters

    • Rest ...args: [latitude: number, longitude: number, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "horizontal_accuracy" | "heading" | "proximity_alert_radius" | "live_period">]

    Returns Promise<LocationMessage>

replyWithMarkdown

  • replyWithMarkdown(markdown: string, extra?: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">): Promise<TextMessage>
  • Parameters

    • markdown: string
    • Optional extra: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">

    Returns Promise<TextMessage>

replyWithMarkdownV2

  • replyWithMarkdownV2(markdown: string, extra?: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">): Promise<TextMessage>
  • Parameters

    • markdown: string
    • Optional extra: Pick<{}, "parse_mode" | "entities" | "disable_web_page_preview" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">

    Returns Promise<TextMessage>

replyWithMediaGroup

  • replyWithMediaGroup(...args: [media: readonly ({} | {})[], extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply">]): Promise<(DocumentMessage | AudioMessage | PhotoMessage | VideoMessage)[]>
  • Parameters

    • Rest ...args: [media: readonly ({} | {})[], extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply">]

    Returns Promise<(DocumentMessage | AudioMessage | PhotoMessage | VideoMessage)[]>

replyWithPhoto

  • replyWithPhoto(...args: [photo: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities">]): Promise<PhotoMessage>
  • Parameters

    • Rest ...args: [photo: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities">]

    Returns Promise<PhotoMessage>

replyWithPoll

  • replyWithPoll(...args: [question: string, options: readonly string[], extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "is_anonymous" | "allows_multiple_answers" | "correct_option_id" | "explanation" | "explanation_parse_mode" | "explanation_entities" | "open_period" | "close_date" | "is_closed">]): Promise<PollMessage>
  • Parameters

    • Rest ...args: [question: string, options: readonly string[], extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "is_anonymous" | "allows_multiple_answers" | "correct_option_id" | "explanation" | "explanation_parse_mode" | "explanation_entities" | "open_period" | "close_date" | "is_closed">]

    Returns Promise<PollMessage>

replyWithQuiz

  • replyWithQuiz(...args: [question: string, options: readonly string[], extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "is_anonymous" | "allows_multiple_answers" | "correct_option_id" | "explanation" | "explanation_parse_mode" | "explanation_entities" | "open_period" | "close_date" | "is_closed">]): Promise<PollMessage>
  • Parameters

    • Rest ...args: [question: string, options: readonly string[], extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "is_anonymous" | "allows_multiple_answers" | "correct_option_id" | "explanation" | "explanation_parse_mode" | "explanation_entities" | "open_period" | "close_date" | "is_closed">]

    Returns Promise<PollMessage>

replyWithSticker

  • replyWithSticker(...args: [sticker: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]): Promise<StickerMessage>
  • Parameters

    • Rest ...args: [sticker: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">]

    Returns Promise<StickerMessage>

replyWithVenue

  • replyWithVenue(...args: [latitude: number, longitude: number, title: string, address: string, extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "foursquare_id" | "foursquare_type" | "google_place_id" | "google_place_type">]): Promise<VenueMessage>
  • Parameters

    • Rest ...args: [latitude: number, longitude: number, title: string, address: string, extra: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "foursquare_id" | "foursquare_type" | "google_place_id" | "google_place_type">]

    Returns Promise<VenueMessage>

replyWithVideo

  • replyWithVideo(...args: [video: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration" | "thumb" | "width" | "height" | "supports_streaming">]): Promise<VideoMessage>
  • Parameters

    • Rest ...args: [video: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration" | "thumb" | "width" | "height" | "supports_streaming">]

    Returns Promise<VideoMessage>

replyWithVideoNote

  • replyWithVideoNote(...args: [videoNote: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "duration" | "thumb" | "length">]): Promise<VideoNoteMessage>
  • Parameters

    • Rest ...args: [videoNote: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer, extra?: Pick<{}, "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "duration" | "thumb" | "length">]

    Returns Promise<VideoNoteMessage>

replyWithVoice

  • replyWithVoice(...args: [voice: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration">]): Promise<VoiceMessage>
  • Parameters

    • Rest ...args: [voice: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL, extra?: Pick<{}, "parse_mode" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup" | "caption" | "caption_entities" | "duration">]

    Returns Promise<VoiceMessage>

restrictChatMember

  • restrictChatMember(...args: [userId: number, extra: Pick<{}, "permissions" | "until_date">]): Promise<true>

setChatAdministratorCustomTitle

  • setChatAdministratorCustomTitle(...args: [userId: number, title: string]): Promise<true>

setChatDescription

  • setChatDescription(...args: [description?: string]): Promise<true>

setChatPermissions

  • setChatPermissions(...args: [permissions: ChatPermissions]): Promise<true>

setChatPhoto

  • setChatPhoto(...args: [photo: InputFile]): Promise<true>

setChatStickerSet

  • setChatStickerSet(setName: string): Promise<true>

setChatTitle

  • setChatTitle(...args: [title: string]): Promise<true>

setMyCommands

  • setMyCommands(commands: readonly BotCommand[]): Promise<true>

setPassportDataErrors

  • setPassportDataErrors(errors: readonly PassportElementError[]): Promise<true>

setStickerPositionInSet

  • setStickerPositionInSet(sticker: string, position: number): Promise<true>

setStickerSetThumb

  • setStickerSetThumb(...args: [name: string, userId: number, thumb: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL]): Promise<true>
  • Parameters

    • Rest ...args: [name: string, userId: number, thumb: string | InputFileByPath | InputFileByReadableStream | InputFileByBuffer | InputFileByURL]

    Returns Promise<true>

stopMessageLiveLocation

  • stopMessageLiveLocation(markup?: InlineKeyboardMarkup): Promise<true | (Edited & LocationMessage)>

stopPoll

  • stopPoll(...args: [messageId: number, extra: Pick<{}, "reply_markup">]): Promise<Poll>
  • Parameters

    • Rest ...args: [messageId: number, extra: Pick<{}, "reply_markup">]

    Returns Promise<Poll>

unbanChatMember

  • unbanChatMember(...args: [userId: number, extra?: { only_if_banned?: undefined | boolean }]): Promise<true>
  • Parameters

    • Rest ...args: [userId: number, extra?: { only_if_banned?: undefined | boolean }]

    Returns Promise<true>

unpinAllChatMessages

  • unpinAllChatMessages(...args: []): Promise<true>

unpinChatMessage

  • unpinChatMessage(...args: [messageId?: number]): Promise<true>

uploadStickerFile

  • uploadStickerFile(...args: [stickerFile: InputFile]): Promise<File>

Generated using TypeDoc