createTopic

Create a forum topic.

Parameters

chatId: ID

The identifier of a chat.

title: string

The title of the topic.

color?: number

The color to use for the default topic icon.

customEmojiId?: string

Identifier of a custom emoji to display as the icon of the topic.

sendAs?: ID

The identifier of a chat to create the topic on behalf of. User-only.

Result

The created topic.

Syntax

// Required parameters only.
await client.createTopic(chatId, title);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.createTopic(chatId, title, {
    color,
    customEmojiId,
    sendAs,
});