translateMessages

Translate multiple texts. USER-ONLY

Parameters

toLanguage: string

The code of the language to translate into.

chatId: ID

The identifier of the chat including the messages.

messageIds: number[]

The identifiers of the messages to translate.

tone?: string

The tone of the translation.

Result

Syntax

// Required parameters only.
await client.translateMessages(toLanguage, chatId, messageIds);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.translateMessages(toLanguage, chatId, messageIds, { tone });