TgKit library and website are still in early development!

MessageEntity Class

extends Base

Represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

Methods

toJSON

Properties

client Client

See the code

customEmojiId string

For 'customEmoji' only, unique identifier of the custom emoji. Use

See the code

language string

For 'pre' only, the programming language of the entity text

See the code

length number

Length of the entity in UTF-16 code units

See the code

offset number

Offset in UTF-16 code units to the start of the entity

See the code

type MessageEntityType

Type of the entity

See the code

url string

For 'textLink' only, url that will be opened after user taps on the text

See the code

user User

For 'textMention' only, the mentioned user

See the code

Methods

toJSON(): object

See the code