export Class
MessageEntitiesStore ​
Constructor ​
new MessageEntitiesStore( text, entities )
Parameter | Type | Description |
---|---|---|
text | string | |
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 ) ​
Parameter | Type | Description |
---|---|---|
type | EntityType | Obtains 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 ) ​
Parameter | Type | Description |
---|---|---|
type | EntityType | The type of the message entity. |
index | number | The 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 ) ​
Parameter | Type | Description |
---|---|---|
offset | number | The starting position of the string. |
length | number | The 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[]
text_links( ) ​
Returns:
MessageEntityPayload[]
text_mentions( ) ​
Returns:
MessageEntityPayload[]
underlines( ) ​
Returns:
MessageEntityPayload[]
urls( ) ​
Returns:
MessageEntityPayload[]