Interface WizardContext<D>

Type Parameters

Hierarchy

Properties

Accessors

Methods

addStickerToSet answerCbQuery answerGameQuery answerInlineQuery answerPreCheckoutQuery answerShippingQuery approveChatJoinRequest banChatMember banChatSenderChat closeForumTopic closeGeneralForumTopic copyMessage createChatInviteLink createForumTopic createNewStickerSet declineChatJoinRequest deleteChatPhoto deleteChatStickerSet deleteForumTopic deleteMessage deleteStickerFromSet editChatInviteLink editForumTopic editGeneralForumTopic editMessageCaption editMessageLiveLocation editMessageMedia editMessageReplyMarkup editMessageText exportChatInviteLink forwardMessage getChat getChatAdministrators getChatMember getChatMembersCount getChatMenuButton getMyCommands getMyDefaultAdministratorRights getStickerSet has hideGeneralForumTopic leaveChat persistentChatAction pinChatMessage promoteChatMember reopenForumTopic reopenGeneralForumTopic reply replyWithAnimation replyWithAudio replyWithChatAction replyWithContact replyWithDice replyWithDocument replyWithGame replyWithHTML replyWithInvoice replyWithLocation replyWithMarkdown replyWithMarkdownV2 replyWithMediaGroup replyWithPhoto replyWithPoll replyWithQuiz replyWithSticker replyWithVenue replyWithVideo replyWithVideoNote replyWithVoice restrictChatMember revokeChatInviteLink sendAnimation sendAudio sendChatAction sendContact sendDice sendDocument sendGame sendInvoice sendLocation sendMediaGroup sendMessage sendPhoto sendPoll sendQuiz sendSticker sendVenue sendVideo sendVideoNote sendVoice setChatAdministratorCustomTitle setChatDescription setChatMenuButton setChatPermissions setChatPhoto setChatStickerSet setChatTitle setMyCommands setMyDefaultAdministratorRights setPassportDataErrors setStickerPositionInSet setStickerSetThumb stopMessageLiveLocation stopPoll unbanChatMember unbanChatSenderChat unhideGeneralForumTopic unpinAllChatMessages unpinAllForumTopicMessages unpinChatMessage uploadStickerFile

Properties

botInfo: UserFromGetMe
session: WizardSession<D>
state: Record<string | symbol, any> = {}
telegram: Telegram
update: Update

Accessors

  • get callbackQuery(): PropOr<U, "callback_query", undefined>
  • Returns PropOr<U, "callback_query", undefined>

  • get channelPost(): PropOr<U, "channel_post", undefined>
  • Returns PropOr<U, "channel_post", undefined>

  • get chat(): PropOr<GetUpdateContent<U>, "chat", undefined>
  • Returns PropOr<GetUpdateContent<U>, "chat", undefined>

  • get chatJoinRequest(): PropOr<U, "chat_join_request", undefined>
  • Returns PropOr<U, "chat_join_request", undefined>

  • get chatMember(): PropOr<U, "chat_member", undefined>
  • Returns PropOr<U, "chat_member", undefined>

  • get chosenInlineResult(): PropOr<U, "chosen_inline_result", undefined>
  • Returns PropOr<U, "chosen_inline_result", undefined>

  • get editedChannelPost(): PropOr<U, "edited_channel_post", undefined>
  • Returns PropOr<U, "edited_channel_post", undefined>

  • get editedMessage(): PropOr<U, "edited_message", undefined>
  • Returns PropOr<U, "edited_message", undefined>

  • get from(): PropOr<GetUpdateContent<U>, "from", undefined>
  • Returns PropOr<GetUpdateContent<U>, "from", undefined>

  • get inlineMessageId(): undefined | string
  • Returns undefined | string

  • get inlineQuery(): PropOr<U, "inline_query", undefined>
  • Returns PropOr<U, "inline_query", undefined>

  • get kickChatMember(): ((...args: [userId: number, untilDate?: number, extra?: Omit<{}, "chat_id" | "user_id" | "until_date">]) => Promise<true>)
  • Returns ((...args: [userId: number, untilDate?: number, extra?: Omit<{}, "chat_id" | "user_id" | "until_date">]) => Promise<true>)

      • (...args: [userId: number, untilDate?: number, extra?: Omit<{}, "chat_id" | "user_id" | "until_date">]): Promise<true>
      • Parameters

        • Rest ...args: [userId: number, untilDate?: number, extra?: Omit<{}, "chat_id" | "user_id" | "until_date">]

        Returns Promise<true>

  • get me(): string
  • Returns string

  • get message(): PropOr<U, "message", undefined>
  • Returns PropOr<U, "message", undefined>

  • get myChatMember(): PropOr<U, "my_chat_member", undefined>
  • Returns PropOr<U, "my_chat_member", undefined>

  • get passportData(): undefined | PassportData
  • Returns undefined | PassportData

  • get poll(): PropOr<U, "poll", undefined>
  • Returns PropOr<U, "poll", undefined>

  • get pollAnswer(): PropOr<U, "poll_answer", undefined>
  • Returns PropOr<U, "poll_answer", undefined>

  • get preCheckoutQuery(): PropOr<U, "pre_checkout_query", undefined>
  • Returns PropOr<U, "pre_checkout_query", undefined>

  • get senderChat(): PropOr<GetUpdateContent<U>, "sender_chat", undefined>
  • Returns PropOr<GetUpdateContent<U>, "sender_chat", undefined>

  • get shippingQuery(): PropOr<U, "shipping_query", undefined>
  • Returns PropOr<U, "shipping_query", undefined>

  • get webAppData(): undefined | {
        button_text: string;
        data: {
            json<T>(): T;
            text(): string;
        };
    }
  • Returns undefined | {
        button_text: string;
        data: {
            json<T>(): T;
            text(): string;
        };
    }

  • get webhookReply(): boolean
  • Deprecated

    use webhookReply

    Returns boolean

  • set webhookReply(enable: boolean): void
  • Parameters

    • enable: boolean

    Returns void

Methods

  • Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

    See

    https://core.telegram.org/bots/api#createforumtopic

    Parameters

    • Rest ...args: [name: string, extra?: Omit<{}, "chat_id" | "name">]

    Returns Promise<ForumTopic>

  • Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

    See

    https://core.telegram.org/bots/api#editforumtopic

    Parameters

    • extra: Omit<{}, "chat_id" | "message_thread_id">

    Returns Promise<true>

  • Parameters

    • latitude: number
    • longitude: number
    • Optional extra: Omit<{}, "chat_id" | "message_id" | "inline_message_id" | "latitude" | "longitude">

    Returns Promise<true | Edited & LocationMessage>

  • Type Parameters

    • Filter extends UpdateType | Guard<Update, Update>

    Parameters

    • filters: MaybeArray<Filter>

    Returns this is FilteredContext<Context<Update>, Filter>

  • See

    https://core.telegram.org/bots/api#sendchataction

    Sends the sendChatAction request repeatedly, with a delay between requests, as long as the provided callback function is being processed.

    The sendChatAction errors should be ignored, because the goal is the actual long process completing and performing an action.

    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"

      chat action type.

    • callback: (() => Promise<void>)

      a function to run along with the chat action.

        • (): Promise<void>
        • Returns Promise<void>

    • extra: Omit<{}, "action" | "chat_id"> & {
          intervalDuration?: number;
      } = {}

      extra parameters for sendChatAction.

    Returns Promise<void>

  • 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>

  • Parameters

    • Rest ...args: [invoice: Omit<{}, "chat_id" | "message_thread_id" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">, extra?: Omit<{}, "chat_id" | "protect_content" | "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>

  • Parameters

    • Rest ...args: [question: string, options: readonly string[], extra?: Omit<{}, "chat_id" | "question" | "options" | "type">]

    Returns Promise<PollMessage>

  • Parameters

    • Rest ...args: [question: string, options: readonly string[], extra: Omit<{}, "chat_id" | "question" | "options" | "type">]

    Returns Promise<PollMessage>

  • Parameters

    • Rest ...args: [latitude: number, longitude: number, title: string, address: string, extra?: Omit<{}, "chat_id" | "title" | "latitude" | "longitude" | "address">]

    Returns Promise<VenueMessage>

  • 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>

  • Parameters

    • invoice: Omit<{}, "chat_id" | "message_thread_id" | "disable_notification" | "reply_to_message_id" | "allow_sending_without_reply" | "reply_markup">
    • Optional extra: Omit<{}, "chat_id" | "protect_content" | "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>

  • Parameters

    • poll: string
    • options: readonly string[]
    • Optional extra: Omit<{}, "chat_id" | "question" | "options" | "type">

    Returns Promise<PollMessage>

  • Parameters

    • quiz: string
    • options: readonly string[]
    • Optional extra: Omit<{}, "chat_id" | "question" | "options" | "type">

    Returns Promise<PollMessage>

  • Parameters

    • latitude: number
    • longitude: number
    • title: string
    • address: string
    • Optional extra: Omit<{}, "chat_id" | "title" | "latitude" | "longitude" | "address">

    Returns Promise<VenueMessage>

Generated using TypeDoc