ComposeMessageWithAIRequest
Both users and bots may be able to use this request. See code examples.
---functions--- messages.composeMessageWithAI#fd426afe flags:# proofread:flags.0?true emojify:flags.3?true text:TextWithEntities translate_to_lang:flags.1?string change_tone:flags.2?string = messages.ComposedMessageWithAI
Returns
| messages.ComposedMessageWithAI |
This type can only be an instance of:
| ComposedMessageWithAI |
Parameters
| text | TextWithEntities | |
| proofread | flag | This argument defaults to None and can be omitted. |
| emojify | flag | This argument defaults to None and can be omitted. |
| translate_to_lang | string | This argument defaults to None and can be omitted. |
| change_tone | string | This argument defaults to None and can be omitted. |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.messages.ComposeMessageWithAIRequest(
text=types.TextWithEntities(
text='some string here',
entities=[types.MessageEntityUnknown(
offset=42,
length=42
)]
),
proofread=True,
emojify=True,
translate_to_lang='some string here',
change_tone='some string here'
))
print(result.stringify())