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>

    • Ban a user from the group.

      Parameters

      • userId: number

        User ID

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

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Ban a channel from posting comments/interacting

      Parameters

      • senderChatId: number

        Sender channel ID to ban

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

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Close an open forum topic

      Parameters

      • OptionalmessageThreadId: number

        Thread ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Close the general topic in a supergroup

      Returns Promise<boolean>

      Promise<boolean>

    • Create a new forum topic in a supergroup

      Parameters

      • name: string

        Topic name

      • Optionaloptions: Omit<CreateForumTopicParams, "chat_id" | "name">

        Additional parameters

      Returns Promise<ForumTopic>

      Promise<ForumTopic>

    • Decline a request to join the chat

      Parameters

      • userId: number

        User ID

      Returns Promise<boolean>

      Promise<boolean>

    • Delete up to 10,000 recent reactions added by a specific user in the group

      Parameters

      • OptionaluserId: number

        User ID whose reactions will be removed. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Delete a forum topic and all its messages

      Parameters

      • OptionalmessageThreadId: number

        Thread ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Delete a message in the group

      Parameters

      • OptionalmessageId: number

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

      Returns Promise<boolean>

      Promise<boolean>

    • Delete reactions applied by a specific user on a message

      Parameters

      • userId: number

        User ID who put the reaction

      • OptionalmessageId: number

        Message ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Delete multiple messages in the group

      Parameters

      • messageIds: number[]

        Array of message IDs

      Returns Promise<boolean>

      Promise<boolean>

    • Delete the group photo

      Returns Promise<boolean>

      Promise<boolean>

    • Delete the collective sticker set for the supergroup

      Returns Promise<boolean>

      Promise<boolean>

    • Edit a forum topic

      Parameters

      • Optionalname: string

        Optional new topic name (0-128 characters). If omitted, the current name is kept.

      • OptionalmessageThreadId: number

        Thread ID. If omitted, resolved from the update.

      • Optionaloptions: Omit<EditForumTopicParams, "chat_id" | "message_thread_id" | "name">

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Edit the general topic name in a supergroup

      Parameters

      • name: string

        New general topic name

      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>

    • Export the group invite link

      Returns Promise<string>

      Promise<string>

    • Get custom emoji stickers for forum topic icons

      Returns Promise<Sticker[]>

      Promise<Sticker[]>

    • Hide the general topic in a supergroup

      Returns Promise<boolean>

      Promise<boolean>

    • Leave the group.

      Returns Promise<boolean>

      Promise<boolean>

    • Pin a message in the group header.

      Parameters

      • OptionalmessageId: number

        Message ID to pin (defaults to the current message if not specified)

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

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Promote or demote a user in the group.

      Parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Reopen a closed forum topic

      Parameters

      • OptionalmessageThreadId: number

        Thread ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Reopen the general topic in a supergroup

      Returns Promise<boolean>

      Promise<boolean>

    • Restrict a user in the group.

      Parameters

      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>

    • 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 an interactive animated dice or other emoji games

      Parameters

      • Optionalemoji: string

        Emoji on which the dice throw animation is based (defaults to 🎲)

      • Optionaloptions: Omit<SendDiceParams, "chat_id" | "emoji">

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Send a poll/survey to the group

      Parameters

      • question: string

        Poll question

      • options: string[] | InputPollOption[]

        Poll answer options (as strings or full InputPollOption objects)

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

        Additional parameters

      Returns Promise<Message>

      Promise<Message>

    • Set a custom title for an administrator promoted by the bot

      Parameters

      • userId: number

        Admin user ID

      • customTitle: string

        Custom title (max 16 characters)

      Returns Promise<boolean>

      Promise<boolean>

    • Change the description of the group

      Parameters

      • description: string

        New group description

      Returns Promise<boolean>

      Promise<boolean>

    • Set a reaction or emoji on a message

      Parameters

      • reaction: ReactionType[]

        List of reaction types to apply

      • OptionalmessageId: number

        Message ID. If omitted, resolved from the update.

      • Optionaloptions: { is_big?: boolean }

        Additional parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Set default chat permissions for all users

      Parameters

      • permissions: ChatPermissions

        Default permissions

      • Optionaloptions: { use_independent_chat_permissions?: boolean }

        Additional parameters (e.g. use_independent_chat_permissions)

      Returns Promise<boolean>

      Promise<boolean>

    • Change the photo of the group

      Parameters

      Returns Promise<boolean>

      Promise<boolean>

    • Set a collective sticker set for the supergroup

      Parameters

      • stickerSetName: string

        Sticker set name

      Returns Promise<boolean>

      Promise<boolean>

    • Change the title of the group

      Parameters

      • title: string

        New group title

      Returns Promise<boolean>

      Promise<boolean>

    • Unban a user from the group.

      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>

    • Unhide the general topic in a supergroup

      Returns Promise<boolean>

      Promise<boolean>

    • Unpin a message in the group.

      Parameters

      • OptionalmessageId: number

        Optional Message ID to unpin. If not specified, the latest pinned message is unpinned.

      Returns Promise<boolean>

      Promise<boolean>

    • Unpin all pinned messages in the group

      Returns Promise<boolean>

      Promise<boolean>

    • Unpin all messages in a forum topic

      Parameters

      • OptionalmessageThreadId: number

        Thread ID. If omitted, resolved from the update.

      Returns Promise<boolean>

      Promise<boolean>

    • Unpin all messages in the general topic

      Returns Promise<boolean>

      Promise<boolean>