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
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Boolean@NonNull BooleangetBot()@Nullable Boolean@Nullable Boolean@NonNull String@NonNull LonggetId()@Nullable String@Nullable String@Nullable Boolean@Nullable String@Nullable BooleanvoidsetAddedToAttachmentMenu(@Nullable Boolean addedToAttachmentMenu) voidvoidsetCanJoinGroups(@Nullable Boolean canJoinGroups) voidsetCanReadAllGroupMessages(@Nullable Boolean canReadAllGroupMessages) voidsetFirstName(@NonNull String firstName) voidvoidsetLanguageCode(@Nullable String languageCode) voidsetLastName(@Nullable String lastName) voidsetPremium(@Nullable Boolean premium) voidsetSupportsInlineQueries(@Nullable Boolean supportsInlineQueries) voidsetUsername(@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
-