Class ChatAdministratorRights
java.lang.Object
io.micronaut.chatbots.telegram.api.ChatAdministratorRights
Represents the rights of an administrator in a chat.
ChatAdministratorRights
- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Boolean@NonNull Boolean@Nullable Boolean@NonNull Boolean@NonNull Boolean@NonNull Boolean@Nullable Boolean@Nullable Boolean@NonNull Boolean@NonNull Boolean@NonNull BooleanvoidsetAnonymous(@NonNull Boolean anonymous) voidsetCanChangeInfo(@NonNull Boolean canChangeInfo) voidsetCanDeleteMessages(@NonNull Boolean canDeleteMessages) voidsetCanEditMessages(@Nullable Boolean canEditMessages) voidsetCanInviteUsers(@NonNull Boolean canInviteUsers) voidsetCanManageChat(@NonNull Boolean canManageChat) voidsetCanManageVideoChats(@NonNull Boolean canManageVideoChats) voidsetCanPinMessages(@Nullable Boolean canPinMessages) voidsetCanPostMessages(@Nullable Boolean canPostMessages) voidsetCanPromoteMembers(@NonNull Boolean canPromoteMembers) voidsetCanRestrictMembers(@NonNull Boolean canRestrictMembers)
-
Constructor Details
-
ChatAdministratorRights
public ChatAdministratorRights()
-
-
Method Details
-
isAnonymous
- Returns:
- True, if the user's presence in the chat is hidden
-
setAnonymous
- Parameters:
anonymous- True, if the user's presence in the chat is hidden
-
getCanManageChat
- Returns:
- True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
-
setCanManageChat
- Parameters:
canManageChat- True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
-
getCanDeleteMessages
- Returns:
- True, if the administrator can delete messages of other users
-
setCanDeleteMessages
- Parameters:
canDeleteMessages- True, if the administrator can delete messages of other users
-
getCanManageVideoChats
- Returns:
- True, if the administrator can manage video chats
-
setCanManageVideoChats
- Parameters:
canManageVideoChats- True, if the administrator can manage video chats
-
getCanRestrictMembers
- Returns:
- True, if the administrator can restrict, ban or unban chat members
-
setCanRestrictMembers
- Parameters:
canRestrictMembers- True, if the administrator can restrict, ban or unban chat members
-
getCanPromoteMembers
- Returns:
- True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
-
setCanPromoteMembers
- Parameters:
canPromoteMembers- True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
-
getCanChangeInfo
- Returns:
- True, if the user is allowed to change the chat title, photo and other settings
-
setCanChangeInfo
- Parameters:
canChangeInfo- True, if the user is allowed to change the chat title, photo and other settings
-
getCanInviteUsers
- Returns:
- True, if the user is allowed to invite new users to the chat
-
setCanInviteUsers
- Parameters:
canInviteUsers- True, if the user is allowed to invite new users to the chat
-
getCanPostMessages
- Returns:
- Optional. True, if the administrator can post in the channel; channels only
-
setCanPostMessages
- Parameters:
canPostMessages- Optional. True, if the administrator can post in the channel; channels only
-
getCanEditMessages
- Returns:
- Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
-
setCanEditMessages
- Parameters:
canEditMessages- True, if the administrator can edit messages of other users and can pin messages; channels only
-
getCanPinMessages
- Returns:
- Optional. True, if the user is allowed to pin messages; groups and supergroups only
-
setCanPinMessages
- Parameters:
canPinMessages- Optional. True, if the user is allowed to pin messages; groups and supergroups only
-