Class Forum

Hierarchy (view full)

Constructors

Properties

chatId: string

Unique identifier for this chat

threadId: string

Unique identifier of the forum topic

Accessors

Methods

  • Protected

    Patches the current instance with new data

    Parameters

    • data: Record<string, any>

      The data to patch the instance with

    Returns Record<string, any>

    The patched data

  • Protected

    Updates the current instance with new data and returns a clone of the updated instance

    Parameters

    • data: Record<string, any>

      The data to update the instance with

    Returns Base

    A clone of the updated instance

  • Use this method to close an open 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, unless it is the creator of the topic.

    Returns Promise<true>

    Returns True on success.

  • Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights.

    Returns Promise<true>

    Returns True on success.

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

    Parameters

    • Optionalname: string

      New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept

    • OptionalcustomEmojiId: string

      New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept

    Returns Promise<true>

    Returns True on success.

  • Use this method to reopen a closed 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, unless it is the creator of the topic.

    Returns Promise<true>

    Returns True on success.

  • Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup.

    Returns Promise<true>

    Returns True on success.