class
Hamilton::Types::MessageEntity
- Hamilton::Types::MessageEntity
- Reference
- Object
Overview
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Included Modules
- Hamilton::Types::Common
- JSON::Serializable
Defined in:
types/message_entity.crConstructors
- .new(pull : JSON::PullParser)
- .new(params)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(**params)
Instance Method Summary
-
#custom_emoji_id : String | Nil
For “custom_emoji” only, unique identifier of the custom emoji.
-
#custom_emoji_id=(custom_emoji_id : String | Nil)
For “custom_emoji” only, unique identifier of the custom emoji.
-
#language : String | Nil
For “pre” only, the programming language of the entity text.
-
#language=(language : String | Nil)
For “pre” only, the programming language of the entity text.
-
#length : Int32
Length of the entity in UTF-16 code units.
-
#length=(length : Int32)
Length of the entity in UTF-16 code units.
-
#non_nil_fields : Array(String)
List of available non-nil fields.
-
#non_nil_fields=(non_nil_fields : Array(String))
List of available non-nil fields.
-
#offset : Int32
Offset in UTF-16 code units to the start of the entity.
-
#offset=(offset : Int32)
Offset in UTF-16 code units to the start of the entity.
-
#type : String
Type of the entity.
-
#type=(type : String)
Type of the entity.
-
#url : String | Nil
For “text_link” only, URL that will be opened after user taps on the text.
-
#url=(url : String | Nil)
For “text_link” only, URL that will be opened after user taps on the text.
-
#user : Hamilton::Types::User | Nil
For “text_mention” only, the mentioned user.
-
#user=(user : Hamilton::Types::User | Nil)
For “text_mention” only, the mentioned user.
Instance methods inherited from class Reference
==(other : Hamilton::Any)
==
Instance methods inherited from class Object
===(other : Hamilton::Any)
===
Constructor Detail
Instance Method Detail
For “custom_emoji” only, unique identifier of the custom emoji.
For “custom_emoji” only, unique identifier of the custom emoji.
For “pre” only, the programming language of the entity text.
Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
For “text_link” only, URL that will be opened after user taps on the text.