MadelineProtoDocs/docs/API_docs/constructors/messageEntityPre.md
2019-12-27 17:48:04 +01:00

1.1 KiB

title description image
messageEntityPre Message entity representing a preformatted `codeblock`, allowing the user to specify a programming language for the codeblock. https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: messageEntityPre

Back to constructors index

Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.

Attributes:

Name Type Required Description
offset int Yes Offset of message entity within message (in UTF-8 codepoints)
length int Yes Length of message entity within message (in UTF-8 codepoints)
language string Yes Programming language of the code

Type: MessageEntity

Example:

$messageEntityPre = ['_' => 'messageEntityPre', 'offset' => int, 'length' => int, 'language' => 'string'];

Or, if you're into Lua:

messageEntityPre={_='messageEntityPre', offset=int, length=int, language='string'}