createStory

Create a story. User-only.

Parameters

chatId: ID

The content of the story.

interactiveAreas?: StoryInteractiveArea[]

The story’s interactive areas.

privacy?: StoryPrivacy

The story’s privacy settings.

activeFor?: number

The period in which the story will be active.

highlight?: boolean

Whether to add the story to highlights.

protectContent?: boolean

Whether to protect the contents of the story from copying and forwarding.

caption?: string

The caption to attach.

captionEntities?: MessageEntity[]

The caption’s entities.

parseMode?: ParseMode

The parse mode to use for the caption. If not provided, the default parse mode will be used.

fileName?: string

The file name to assign if applicable.

fileSize?: number

The file’s size.

mimeType?: string

The mime type to assign if applicable.

chunkSize?: number

Size of each upload chunk in bytes.

signal?: AbortSignal

Upload abort signal.

Result

The created story.

Syntax

// Required parameters only.
await client.createStory(chatId, content);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.createStory(chatId, content, {
    interactiveAreas,
    privacy,
    activeFor,
    highlight,
    protectContent,
    caption,
    captionEntities,
    parseMode,
    fileName,
    fileSize,
    mimeType,
    chunkSize,
    signal,
});