Class MessageEntity
java.lang.Object
io.micronaut.chatbots.telegram.api.MessageEntity
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
@Nullable String
@NonNull Integer
@NonNull Integer
@NonNull String
getType()
@Nullable String
getUrl()
@Nullable User
getUser()
void
setCustomEmojiId
(@Nullable String customEmojiId) void
setLanguage
(@Nullable String language) void
void
void
void
void
toString()
-
Constructor Details
-
MessageEntity
public MessageEntity()
-
-
Method Details
-
getType
- Returns:
- Type of the entity.
-
setType
- Parameters:
type
- Type of the entity.
-
getOffset
- Returns:
- Offset in UTF-16 code units to the start of the entity.
-
setOffset
- Parameters:
offset
- Offset in UTF-16 code units to the start of the entity.
-
getLength
- Returns:
- Length of the entity in UTF-16 code units.
-
setLength
- Parameters:
length
- Length of the entity in UTF-16 code units.
-
getUrl
- Returns:
- For “text_link” only, url that will be opened after user taps on the text.
-
setUrl
- Parameters:
url
- For “text_link” only, url that will be opened after user taps on the text.
-
getUser
- Returns:
- For “text_mention” only, the mentioned user.
-
setUser
- Parameters:
user
- For “text_mention” only, the mentioned user.
-
getLanguage
- Returns:
- For “pre” only, the programming language of the entity text
-
setLanguage
- Parameters:
language
- For “pre” only, the programming language of the entity text
-
getCustomEmojiId
- Returns:
- For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker
-
setCustomEmojiId
- Parameters:
customEmojiId
- For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker
-
toString
-