Documentation - v0.31.0
    Preparing search index...

    Function createForumTopic

    • Create a topic in a forum

      Only admins with manageTopics permission can do this.

      Note: for bots in private chats with "threaded mode" enabled, message IDs are separate for each side of the chat, while the canonical topic ID is always issued in the user's ID space. The .id of the returned service message is in the bot's ID space, and is not a valid topic ID — use .replyToMessage.threadId instead, which is what all other methods (as well as Bot API's message_thread_id) expect.

      Parameters

      • client: ITelegramClient
      • params: {
            chatId: InputPeerLike;
            icon?: number | Long;
            sendAs?: InputPeerLike;
            shouldDispatch?: true;
            title: string;
        }
        • chatId: InputPeerLike

          Chat ID or username

        • Optionalicon?: number | Long

          Icon of the topic.

          Can be a number (color in RGB, see ForumTopic static members for allowed values) or a custom emoji ID.

          Icon color can't be changed after the topic is created.

        • OptionalsendAs?: InputPeerLike

          Send as a specific channel

        • OptionalshouldDispatch?: true

          Whether to dispatch the returned service message (if any) to the client's update handler.

        • title: string

          Topic title

      Returns Promise<Message>

      Service message for the created topic