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.

mimeType?: string

The mime type to assign if applicable.

chunkSize?: number

Size of each upload chunk in bytes.

signal?: AbortSignal | null

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,
    mimeType,
    chunkSize,
    signal,
});