• Create a topic in a forum

    Only admins with manageTopics permission can do this.

    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