ultra-telegram-framework
    Preparing search index...

    Class ReplyContextAbstract

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    callbackQuery?: CallbackQuery
    update: Update

    Accessors

    • get chatId(): number | undefined

      Returns number | undefined

    • get from(): User | undefined

      Returns User | undefined

    • get isMessageAccessible(): boolean

      Returns boolean

    • get payload(): string

      Returns command arguments (everything that follows the command name). Example: for the message "/start ref_123", it will return "ref_123". If it is just "/start", it will return an empty string.

      Returns string

      string

    • get senderId(): number | undefined

      ID of the user who initiated the event

      Returns number | undefined

      number | undefined

    • get text(): string | undefined

      Returns string | undefined

    Methods

    • Remove loading indicator from an inline button

      Parameters

      • Optionalparams: string | Omit<AnswerCallbackQueryParams, "callback_query_id">

        Parameters object or just the notification text

      Returns Promise<boolean>

      Promise<boolean>

    • Answer a pre-checkout query (Pre-checkout Query)

      Parameters

      • ok: boolean

        Is everything okay

      • OptionalerrorMessage: string

        Error message

      Returns Promise<boolean>

      Promise<boolean>

    • Answer a shipping query (Shipping Query)

      Parameters

      • ok: boolean

        Is everything okay

      • Optionaloptions: Omit<AnswerShippingQueryParams, "shipping_query_id" | "ok">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Copy the current message to another chat

      Parameters

      • toChatId: string | number

        ID of the chat where the message is copied

      Returns Promise<MessageId>

      Promise<MessageId>

    • Delete all reactions of a specific user in the current chat (up to 10,000). By default, deletes the reactions of the user who initiated the event.

      Parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Delete the current message

      Returns Promise<boolean>

      Promise<boolean>

    • Delete reaction on the current message. By default, deletes the reaction of the user who initiated the event.

      Parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Change the caption of the current media file (photo/video)

      Parameters

      • caption: string

        caption

      • Optionaloptions: Omit<EditMessageCaptionParams, "caption" | "chat_id" | "message_id">

        parameters object

      Returns Promise<boolean | Message>

      Promise<Message | boolean>

    • Edit the text or rich content of the current message. Pass a string to edit as plain text, or a rich message object with html/markdown for rich content.

      Parameters

      • content:
            | string
            | (
                ({ html: string; markdown?: undefined; } | { markdown: string; html?: undefined; }) & Pick<InputRichMessage, "is_rtl" | "skip_entity_detection">
            )

        New message text (string) or rich message object (exactly one of html or markdown)

      • Optionaloptions: Omit<EditMessageTextParams, "text" | "chat_id" | "message_id" | "rich_message">

        Additional parameters

      Returns Promise<boolean | Message>

      Promise<Message | boolean>

    • Change only the inline keyboard of the current message or a specific message

      Parameters

      • OptionalreplyMarkup: InlineKeyboardMarkup

        keyboard (pass undefined to remove)

      • OptionalmessageId: number

        optional message ID (defaults to the current message)

      Returns Promise<boolean | Message>

      Promise<Message | boolean>

    • Forward the current message to another chat

      Parameters

      • toChatId: string | number

        ID of the chat where the message is forwarded

      Returns Promise<Message>

      Promise<Message>

    • Get the list of administrators of the current chat

      Returns Promise<ChatMember[]>

      Promise<ChatMember[]>

    • Get high scores table for the game

      Returns Promise<GameHighScore[]>

      Promise<GameHighScore[]>

    • Get information about a specific member in the current chat

      Parameters

      • userId: number

        User ID

      Returns Promise<ChatMember>

      Promise<ChatMember>

    • Parameters

      • operation: string

      Returns { chatId: number; messageId: number }

    • Parameters

      • operation: string
      • force: true

      Returns { chatId: number; messageId: number }

    • Parameters

      • operation: string
      • force: false

      Returns { chatId: number; messageId: number | undefined }

    • Leave the current chat (group/channel)

      Returns Promise<boolean>

      Promise<boolean>

    • React to the current message

      Parameters

      • reactions: ReactionType[]

        Array of reactions (e.g.: [{ type: "emoji", emoji: "👍" }])

      Returns Promise<boolean>

      Promise<boolean>

    • Parameters

      Returns Promise<Message>

    • Send chat action status to the current chat (e.g., "typing", "upload_photo") Automatically detects message_thread_id for forum topics.

      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"

        Action status (e.g., "typing", "upload_photo")

      • Optionaloptions: Omit<SendChatActionParams, "chat_id" | "action">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Reply to the current message with a document (file)

      Parameters

      • document: string | InputFile

        URL of the file or file_id

      • Optionaloptions: Omit<SendDocumentParams, "chat_id" | "document">

        Parameters object or just the notification text

      Returns Promise<Message>

      Promise<Message>

    • Streaming a temporary message (Draft) for generating responses (e.g., AI). This ephemeral message lives for 30 seconds. After completion, it is mandatory to call a regular reply().

      Parameters

      • draftId: number

        unique stream identifier (must be > 0). Identical IDs animate changes.

      • Optionaloptions: Omit<SendMessageDraftParams, "chat_id" | "draft_id">

        parameters object

      Returns Promise<boolean>

      Promise<boolean>

    • Send a game to the current chat

      Parameters

      • gameShortName: string

        short name of the game

      • Optionaloptions: Omit<SendGameParams, "chat_id" | "game_short_name">

        parameters object

      Returns Promise<Message>

      Promise<Message>

    • Send an invoice to the current chat

      Parameters

      Returns Promise<Message>

      Promise<Message>

    • Reply to the current message with a "live photo" (Live Photo)

      Parameters

      • photo: string | InputFile

        URL of the photo or file_id

      • livePhoto: string | InputFile

        URL of the "live photo" or file_id

      • Optionaloptions: Omit<SendLivePhotoParams, "chat_id" | "photo" | "live_photo">

        Parameters object or just the notification text

      Returns Promise<Message>

      Promise<Message>

    • Reply to the current message with a photo

      Parameters

      • photo: string | InputFile

        URL of the image or file_id

      • Optionaloptions: Omit<SendPhotoParams, "chat_id" | "photo">

        Parameters object or just the notification text

      Returns Promise<Message>

      Promise<Message>

    • Send a poll or quiz (Poll / Quiz) to the current chat. Supports new API 10.0 features: media, explanation_media, 1 answer option.

      Parameters

      • question: string

        poll text

      • pollOptions: (string | InputPollOption)[]

        answer options

      • Optionaloptions: Omit<SendPollParams, "chat_id" | "question" | "options">

        parameters object

      Returns Promise<Message>

      Promise<Message>

    • Stream a partial rich message to the user while the message is being generated. The streamed draft is ephemeral (30-second preview). Once finalized, call replyWithRichMessage to persist it.

      Parameters

      • draftId: number

        Unique identifier of the message draft; must be non-zero. Same IDs animate changes.

      • richMessage: (
            | { html: string; markdown?: undefined }
            | { html?: undefined; markdown: string }
        ) & Pick<InputRichMessage, "is_rtl" | "skip_entity_detection">

        The partial rich message to be streamed. Exactly one of html or markdown must be provided.

      • Optionaloptions: Omit<SendRichMessageDraftParams, "chat_id" | "rich_message" | "draft_id">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Reply to the current message with a rich message (HTML or Markdown).

      Parameters

      • richMessage: (
            | { html: string; markdown?: undefined }
            | { html?: undefined; markdown: string }
        ) & Pick<InputRichMessage, "is_rtl" | "skip_entity_detection">

        Rich message object. Exactly one of the fields html or markdown must be provided.

      • Optionaloptions: Omit<SendRichMessageParams, "chat_id" | "rich_message">

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Reply to the current message with a video file

      Parameters

      • video: string | InputFile

        URL of the video or file_id

      • Optionaloptions: Omit<SendVideoParams, "chat_id" | "video">

        Parameters object or just the notification text

      Returns Promise<Message>

      Promise<Message>

    • Send a gift (Star Gift) to the current user

      Parameters

      • giftId: string

        Gift ID

      • Optionaloptions: Omit<SendGiftParams, "chat_id" | "user_id" | "gift_id">

        Parameters object

      Returns Promise<boolean>

      Promise<boolean>

    • Set a high score for a player in the game

      Parameters

      • score: number

        game score

      • Optionaloptions: Omit<SetGameScoreParams, "user_id" | "score">

        parameters object

      Returns Promise<boolean | Message>

      Promise<Message | boolean>