Layer 227
MessagesComposeMessageWithAi
Invokes telegram's AI Editor that can translate, transform, fixup and/or emojify your message in a number of different ways, privately powered by Cocoon, see here for more info!
method
Users
messages.composeMessageWithAI#daecc589 flags:# proofread:flags.0?true emojify:flags.3?true text:TextWithEntities translate_to_lang:flags.1?string tone:flags.2?InputAiComposeTone = messages.ComposedMessageWithAI;
Parameters
| Name | Type | Description |
|---|---|---|
| Proofread | flags .0? true | If set, proofreads and fixes mistakes in the message |
| Emojify | flags .3? true | If set, adds emojis to the message |
| Text | TextWithEntities | The message |
| TranslateToLang | flags .1? string | If set, translates the message to the specified language |
| Tone | flags .2? InputAiComposeTone | If set, rephrases the message using the specified AI composer tone |
Returns
messages.ComposedMessageWithAIGogram Example
// MessagesComposeMessageWithAi - positional arguments result, err := client.MessagesComposeMessageWithAi(nil, nil, &tg.TextWithEntities{}, "Hello, World!", nil) if err != nil { // handle error } // result is *tg.MessagesComposedMessageWithAi
Possible Errors
| Code | Type | Description |
|---|---|---|
| 500 | AICOMPOSE_TIMEOUT | A timeout occurred while composing the message. |
| 400 | AI_COMPOSE_TASK_MISSING | |
| 400 | MESSAGE_EMPTY | The provided message is empty. |