Skip to content

export Class

MessageEntitiesStore ​

Constructor ​

ts
 new MessageEntitiesStore( text, entities )
ParameterTypeDescription
textstring
entities = []MessageEntityPayload[]

Properties ​

entities : MessageEntityPayload[] ​

text : string ​

Methods ​

blockquotes( ) ​

Returns: MessageEntityPayload[]

bolds( ) ​

Returns: MessageEntityPayload[]

bot_commands( ) ​

Returns: MessageEntityPayload[]

cashtags( ) ​

Returns: MessageEntityPayload[]

codes( ) ​

Returns: MessageEntityPayload[]

custom_emojis( ) ​

Returns: MessageEntityPayload[]

emails( ) ​

Returns: MessageEntityPayload[]

expandable_blockquotes( ) ​

Returns: MessageEntityPayload[]

get( type ) ​

ParameterTypeDescription
typeEntityTypeObtains the message entities with type.

Obtains all of the entites with the correct type.

Returns: MessageEntityPayload[]

hashtags( ) ​

Returns: MessageEntityPayload[]

italics( ) ​

Returns: MessageEntityPayload[]

mentions( ) ​

Returns: MessageEntityPayload[]

parse( type, index ) ​

ParameterTypeDescription
typeEntityTypeThe type of the message entity.
indexnumberThe index of the entity, starting from 0.

Obtains an entity by type and index by their appearance in a message.

Returns: string | boolean

parseText( offset, length ) ​

ParameterTypeDescription
offsetnumberThe starting position of the string.
lengthnumberThe length of the portion.

Gets a portion of the string or the message this manager belongs to.

Returns: string

phone_numbers( ) ​

Returns: MessageEntityPayload[]

pres( ) ​

Returns: MessageEntityPayload[]

spoilers( ) ​

Returns: MessageEntityPayload[]

strikethroughs( ) ​

Returns: MessageEntityPayload[]

Returns: MessageEntityPayload[]

text_mentions( ) ​

Returns: MessageEntityPayload[]

underlines( ) ​

Returns: MessageEntityPayload[]

urls( ) ​

Returns: MessageEntityPayload[]

A modern, powerful library for building your Telegram bots, with seamless support for both JavaScript and Typescript.