sendSecretVoice

Send a voice message to a secret chat. USER-ONLY

Parameters

id: number

The identifier of the secret chat.

voice: FileSource

The voice message to send.

duration?: number

The duration of the voice message in seconds.

isSilent?: boolean

Whether the message should be sent silently.

replyToMessageId?: string

The identifier of a message to reply to.

ttl?: number

The message’s time-to-live.

viaBot?: string

The name of the bot that was used to send the message.

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.

progressId?: string

A progress ID retrieved from the method getProgressId. If specified, updates on the upload progress will be sent.

caption?: string

The caption to attach.

entities?: SecretMessageEntity[]

The caption’s entities.

Result

void

Syntax

// Required parameters only.
await client.sendSecretVoice(id, voice);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.sendSecretVoice(id, voice, {
    duration,
    isSilent,
    replyToMessageId,
    ttl,
    viaBot,
    fileName,
    fileSize,
    mimeType,
    chunkSize,
    signal,
    progressId,
    caption,
    entities,
});