1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-15 10:36:54 +01:00
MadelineProto/docs/TD_docs/constructors/inputMessageText.md

49 lines
1.6 KiB
Markdown
Raw Normal View History

---
title: inputMessageText
description: Text message
---
## Constructor: inputMessageText
[Back to constructors index](index.md)
Text message
### Attributes:
| Name | Type | Required | Description |
2017-08-20 11:05:56 +02:00
|----------|---------------|----------|-------------|
|text|[string](../types/string.md) | Yes|Text to send|
|disable\_web\_page\_preview|[Bool](../types/Bool.md) | Yes|Pass true to disable rich preview for link in the message text|
|clear\_draft|[Bool](../types/Bool.md) | Yes|Pass true if chat draft message should be deleted|
|entities|Array of [MessageEntity](../constructors/MessageEntity.md) | Yes|Bold, Italic, Code, Pre, PreCode and TextUrl entities contained in the text. Non-bot users can't use TextUrl entities. Can't be used with non-null parse_mode|
|parse\_mode|[TextParseMode](../types/TextParseMode.md) | Yes|Text parse mode, nullable. Can't be used along with enitities|
### Type: [InputMessageContent](../types/InputMessageContent.md)
### Example:
```
2017-07-23 16:33:46 +02:00
$inputMessageText = ['_' => 'inputMessageText', 'text' => 'string', 'disable_web_page_preview' => Bool, 'clear_draft' => Bool, 'entities' => [MessageEntity], 'parse_mode' => TextParseMode];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2017-07-23 16:33:46 +02:00
{"_": "inputMessageText", "text": "string", "disable_web_page_preview": Bool, "clear_draft": Bool, "entities": [MessageEntity], "parse_mode": TextParseMode}
2017-07-23 16:11:02 +02:00
```
Or, if you're into Lua:
```
2017-07-23 16:33:46 +02:00
inputMessageText={_='inputMessageText', text='string', disable_web_page_preview=Bool, clear_draft=Bool, entities={MessageEntity}, parse_mode=TextParseMode}
```