ultra-telegram-framework
    Preparing search index...
    Index

    Constructors

    Methods

    • Process a received chat join request query

      Parameters

      • result: "approve" | "decline" | "queue"

        Outcome ('approve', 'decline', or 'queue')

      • OptionalqueryId: string

        Optional query ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Approve a request to join the chat

      Parameters

      • userId: number

        User ID

      Returns Promise<boolean>

      Promise<boolean>

    • Approve a suggested post to publish it in the channel

      Parameters

      • OptionalmessageId: number

        Suggested post message ID. If omitted, resolved from the update.

      • Optionaloptions: Omit<ApproveSuggestedPostParams, "chat_id" | "message_id">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Ban a user from the channel (kick and block)

      Parameters

      • userId: number

        User ID

      • Optionaloptions: Omit<BanChatMemberParams, "chat_id" | "user_id">

        Additional ban settings (e.g. until_date)

      Returns Promise<boolean>

      Promise<boolean>

    • Ban a channel from posting comments/interacting (spammers)

      Parameters

      • senderChatId: number

        Sender channel ID to ban

      • Optionaloptions: Omit<BanChatSenderChatParams, "chat_id" | "sender_chat_id">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Create a subscription invite link for the channel (recurrent payment in Stars)

      Parameters

      • subscriptionPeriod: number

        Period in seconds (currently 2592000 for 30 days)

      • subscriptionPrice: number

        Amount of Stars per period

      • Optionaloptions: Omit<
            CreateChatSubscriptionInviteLinkParams,
            "chat_id"
            | "subscription_period"
            | "subscription_price",
        >

        Additional parameters

      Returns Promise<ChatInviteLink>

      Promise<ChatInviteLink>

    • Decline a request to join the chat

      Parameters

      • userId: number

        User ID

      Returns Promise<boolean>

      Promise<boolean>

    • Decline a suggested post

      Parameters

      • OptionalmessageId: number

        Suggested post message ID. If omitted, resolved from the update.

      • Optionaloptions: Omit<DeclineSuggestedPostParams, "chat_id" | "message_id">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Delete a post from the channel

      Parameters

      • OptionalmessageId: number

        Message ID to delete. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Delete multiple messages from the channel

      Parameters

      • messageIds: number[]

        Array of message IDs

      Returns Promise<boolean>

      Promise<boolean>

    • Edit an invite link created by the bot

      Parameters

      • inviteLink: string

        Invite link to edit

      • Optionaloptions: Omit<EditChatInviteLinkParams, "chat_id" | "invite_link">

        Additional parameters

      Returns Promise<ChatInviteLink>

      Promise<ChatInviteLink>

    • Edit the caption of a message

      Parameters

      • caption: string

        New message caption

      • OptionalmessageId: number

        Message ID to edit. If omitted, resolved from the update.

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

        Additional parameters

      Returns Promise<boolean | Message>

      Promise<Message | boolean>

    • Edit the media elements of a message

      Parameters

      • media: InputMedia

        New media content

      • OptionalmessageId: number

        Message ID to edit. If omitted, resolved from the update.

      • Optionaloptions: Omit<EditMessageMediaParams, "chat_id" | "message_id" | "media">

        Additional parameters

      Returns Promise<boolean | Message>

      Promise<Message | boolean>

    • Edit the text of a message

      Parameters

      • text: string

        New message text

      • OptionalmessageId: number

        Message ID to edit. If omitted, resolved from the update.

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

        Additional parameters

      Returns Promise<boolean | Message>

      Promise<Message | boolean>

    • Edit a subscription invite link

      Parameters

      Returns Promise<ChatInviteLink>

      Promise<ChatInviteLink>

    • Export the chat invite link

      Returns Promise<string>

      Promise<string>

    • Get the number of members in the channel.

      Returns Promise<number>

      Promise<number>

    • Pin a message in the channel header

      Parameters

      • OptionalmessageId: number

        Message ID to pin. If omitted, resolved from the update.

      • Optionaloptions: Omit<PinChatMessageParams, "chat_id" | "message_id">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Promote or demote a user in the channel (manage administrators)

      Parameters

      • userId: number

        User ID

      • Optionaloptions: Omit<PromoteChatMemberParams, "chat_id" | "user_id">

        Administrator permissions

      Returns Promise<boolean>

      Promise<boolean>

    • Revoke an invite link created by the bot

      Parameters

      • inviteLink: string

        Invite link to revoke

      Returns Promise<ChatInviteLink>

      Promise<ChatInviteLink>

    • Send an animation/GIF

      Parameters

      • animation: string | InputFile

        Animation URL or file_id

      • Optionaloptions: Omit<SendAnimationParams, "chat_id" | "animation">

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send an audio file

      Parameters

      • audio: string | InputFile

        Audio URL or file_id

      • Optionaloptions: Omit<SendAudioParams, "chat_id" | "audio">

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Show a Mini App to the user before deciding on their join request

      Parameters

      • webAppUrl: string

        Mini App URL to be opened

      • OptionalqueryId: string

        Optional query ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Send a document/file

      Parameters

      • document: string | InputFile

        Document URL or file_id

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

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send a text message to the channel

      Parameters

      • text: string

        Message text

      • Optionaloptions: Omit<SendMessageParams, "text" | "chat_id">

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send a photo to the channel

      Parameters

      • photo: string | InputFile

        Photo URL or file_id

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

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send a rich message using HTML or Markdown

      Parameters

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

        The rich message options

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

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send a video to the channel

      Parameters

      • video: string | InputFile

        Video URL or file_id

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

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send a voice message

      Parameters

      • voice: string | InputFile

        Voice URL or file_id

      • Optionaloptions: Omit<SendVoiceParams, "chat_id" | "voice">

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Unban a user from the channel

      Parameters

      • userId: number

        User ID

      • Optionaloptions: Omit<UnbanChatMemberParams, "chat_id" | "user_id">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Unban a previously banned channel

      Parameters

      • senderChatId: number

        Sender channel ID to unban

      Returns Promise<boolean>

      Promise<boolean>

    • Unpin all pinned messages in the channel

      Returns Promise<boolean>

      Promise<boolean>

    • Unpin a message from the channel header

      Parameters

      • OptionalmessageId: number

        Optional message ID to unpin. If omitted, the latest pinned message is unpinned.

      Returns Promise<boolean>

      Promise<boolean>