Interface SceneContext<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 deleteStickerSet 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 setCustomEmojiStickerSetThumbnail setMyCommands setMyDefaultAdministratorRights setPassportDataErrors setStickerEmojiList setStickerKeywords setStickerMaskPosition setStickerPositionInSet setStickerSetThumb setStickerSetThumbnail setStickerSetTitle stopMessageLiveLocation stopPoll unbanChatMember unbanChatSenderChat unhideGeneralForumTopic unpinAllChatMessages unpinAllForumTopicMessages unpinAllGeneralForumTopicMessages unpinChatMessage uploadStickerFile

Properties

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

Accessors

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

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

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

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

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

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

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

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

  • 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">
  • Returns PropOr<U, "inline_query">

  • get me(): string
  • Returns string

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

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

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

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

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

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

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

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

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

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.

    Parameters

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

    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.

    Parameters

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

    Returns Promise<true>

  • Type Parameters

    Parameters

    • filters: MaybeArray<Filter>

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

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

    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

    • 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">]
      Rest

    Returns Promise<InvoiceMessage>

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

    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">
      Optional

    Returns Promise<InvoiceMessage>

Generated using TypeDoc