Class User
java.lang.Object
io.micronaut.chatbots.telegram.api.User
This object represents a Telegram user or bot.
User
- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable Boolean
@NonNull Boolean
getBot()
@Nullable Boolean
@Nullable Boolean
@NonNull String
@NonNull Long
getId()
@Nullable String
@Nullable String
@Nullable Boolean
@Nullable String
@Nullable Boolean
void
setAddedToAttachmentMenu
(@Nullable Boolean addedToAttachmentMenu) void
void
setCanJoinGroups
(@Nullable Boolean canJoinGroups) void
setCanReadAllGroupMessages
(@Nullable Boolean canReadAllGroupMessages) void
setFirstName
(@NonNull String firstName) void
void
setLanguageCode
(@Nullable String languageCode) void
setLastName
(@Nullable String lastName) void
setPremium
(@Nullable Boolean premium) void
setSupportsInlineQueries
(@Nullable Boolean supportsInlineQueries) void
setUsername
(@Nullable String username) toString()
-
Constructor Details
-
User
public User()
-
-
Method Details
-
getId
- Returns:
- Unique identifier for this user or bot.
-
setId
- Parameters:
id
- Unique identifier for this user or bot.
-
getBot
- Returns:
- True, if this user is a bot.
-
setBot
- Parameters:
bot
- True, if this user is a bot.
-
getFirstName
- Returns:
- User‘s or bot’s first name.
-
setFirstName
- Parameters:
firstName
- User‘s or bot’s first name.
-
getLastName
- Returns:
- User‘s or bot’s last name.
-
setLastName
- Parameters:
lastName
- User‘s or bot’s last name.
-
getUsername
- Returns:
- User‘s or bot’s username.
-
setUsername
- Parameters:
username
- User‘s or bot’s username.
-
getLanguageCode
- Returns:
- IETF language tag of the user's language.
-
setLanguageCode
- Parameters:
languageCode
- IETF language tag of the user's language.
-
getCanJoinGroups
- Returns:
- True, if the bot can be invited to groups. Returned only in getMe.
-
setCanJoinGroups
- Parameters:
canJoinGroups
- True, if the bot can be invited to groups. Returned only in getMe.
-
getCanReadAllGroupMessages
- Returns:
- True, if privacy mode is disabled for the bot. Returned only in getMe.
-
setCanReadAllGroupMessages
- Parameters:
canReadAllGroupMessages
- True, if privacy mode is disabled for the bot. Returned only in getMe.
-
getSupportsInlineQueries
- Returns:
- True, if the bot supports inline queries. Returned only in getMe.
-
setSupportsInlineQueries
- Parameters:
supportsInlineQueries
- True, if the bot supports inline queries. Returned only in getMe.
-
toString
-
isPremium
- Returns:
- True, if this user is a Telegram Premium user
-
setPremium
- Parameters:
premium
- True, if this user is a Telegram Premium user
-
getAddedToAttachmentMenu
- Returns:
- True, if this user added the bot to the attachment menu
-
setAddedToAttachmentMenu
- Parameters:
addedToAttachmentMenu
- True, if this user added the bot to the attachment menu
-