translateMessage

Translate a single text. USER-ONLY

Parameters

toLanguage: string

The code of the language to translate into.

chatId: ID

The identifier of the chat including the message.

messageId: number

The identifier of the message to translate.

tone?: string

The tone of the translation.

Result

Syntax

// Required parameters only.
await client.translateMessage(toLanguage, chatId, messageId);

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