Class Chat
java.lang.Object
io.micronaut.chatbots.telegram.api.Chat
This object represents a chat.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
getBio()
@Nullable Boolean
@Nullable String
@Nullable String
@Nullable Boolean
@Nullable Boolean
@Nullable Boolean
@NonNull Long
getId()
@Nullable String
@Nullable Boolean
@Nullable Boolean
@Nullable String
@Nullable Integer
@Nullable ChatLocation
@Nullable Integer
@Nullable ChatPermissions
@Nullable ChatPhoto
getPhoto()
@Nullable Message
@Nullable Integer
@Nullable String
@Nullable String
getTitle()
@NonNull String
getType()
@Nullable String
void
void
setCanSetStickerSet
(@Nullable Boolean canSetStickerSet) void
setDescription
(@Nullable String description) void
setFirstName
(@Nullable String firstName) void
setHasPrivateForwards
(@Nullable Boolean hasPrivateForwards) void
setHasProtectedContent
(@Nullable Boolean hasProtectedContent) void
setHasRestrictedVoiceAndVideoMessages
(@Nullable Boolean hasRestrictedVoiceAndVideoMessages) void
void
setInviteLink
(@Nullable String inviteLink) void
setJoinByRequest
(@Nullable Boolean joinByRequest) void
setJoinToSendMessages
(@Nullable Boolean joinToSendMessages) void
setLastName
(@Nullable String lastName) void
setLinkedChatId
(@Nullable Integer linkedChatId) void
setLocation
(@Nullable ChatLocation location) void
setMessageAutoDeleteTime
(@Nullable Integer messageAutoDeleteTime) void
setPermissions
(@Nullable ChatPermissions permissions) void
void
setPinnedMessage
(@Nullable Message pinnedMessage) void
setSlowModeDelay
(@Nullable Integer slowModeDelay) void
setStickerSetName
(@Nullable String stickerSetName) void
void
void
setUsername
(@Nullable String username) toString()
-
Constructor Details
-
Chat
public Chat()
-
-
Method Details
-
getId
- Returns:
- Unique identifier for this chat.
-
setId
- Parameters:
id
- Unique identifier for this chat.
-
getType
- Returns:
- Type of chat, can be either “private”, “group”, “supergroup” or “channel”.
-
setType
- Parameters:
type
- Type of chat, can be either “private”, “group”, “supergroup” or “channel”.
-
getTitle
- Returns:
- Title, for supergroups, channels and group chats.
-
setTitle
- Parameters:
title
- Title, for supergroups, channels and group chats.
-
getUsername
- Returns:
- Username, for private chats, supergroups and channels if available.
-
setUsername
- Parameters:
username
- Username, for private chats, supergroups and channels if available.
-
getFirstName
- Returns:
- First name of the other party in a private chat.
-
setFirstName
- Parameters:
firstName
- First name of the other party in a private chat.
-
getLastName
- Returns:
- Last name of the other party in a private chat.
-
setLastName
- Parameters:
lastName
- Last name of the other party in a private chat.
-
getPhoto
- Returns:
- Chat photo. Returned only in getChat.
-
setPhoto
- Parameters:
photo
- Chat photo. Returned only in getChat.
-
getDescription
- Returns:
- Description, for groups, supergroups and channel chats. Returned only in getChat.
-
setDescription
- Parameters:
description
- Description, for groups, supergroups and channel chats. Returned only in getChat.
-
getInviteLink
- Returns:
- Chat invite link, for groups, supergroups and channel chats.
-
setInviteLink
- Parameters:
inviteLink
- Chat invite link, for groups, supergroups and channel chats.
-
getPinnedMessage
- Returns:
- Pinned message, for groups, supergroups and channels. Returned only in getChat.
-
setPinnedMessage
- Parameters:
pinnedMessage
- Pinned message, for groups, supergroups and channels. Returned only in getChat.
-
getPermissions
- Returns:
- Default chat member permissions, for groups and supergroups. Returned only in getChat.
-
setPermissions
- Parameters:
permissions
- Default chat member permissions, for groups and supergroups. Returned only in getChat.
-
getSlowModeDelay
- Returns:
- For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user.
-
setSlowModeDelay
- Parameters:
slowModeDelay
- For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user.
-
getStickerSetName
- Returns:
- For supergroups, name of group sticker set. Returned only in getChat.
-
setStickerSetName
- Parameters:
stickerSetName
- For supergroups, name of group sticker set. Returned only in getChat.
-
getCanSetStickerSet
- Returns:
- True, if the bot can change the group sticker set. Returned only in getChat.
-
setCanSetStickerSet
- Parameters:
canSetStickerSet
- True, if the bot can change the group sticker set. Returned only in getChat.
-
getBio
- Returns:
- Bio of the other party in a private chat.
-
setBio
- Parameters:
bio
- Bio of the other party in a private chat.
-
getHasPrivateForwards
- Returns:
- True, if privacy settings of the other party in the private chat allows to use
tg://user?id=<user_id>
links only in chats with the user. Returned only in getChat.
-
setHasPrivateForwards
- Parameters:
hasPrivateForwards
- True, if privacy settings of the other party in the private chat allows to usetg://user?id=<user_id>
links only in chats with the user. Returned only in getChat.
-
getHasRestrictedVoiceAndVideoMessages
- Returns:
- True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
-
setHasRestrictedVoiceAndVideoMessages
public void setHasRestrictedVoiceAndVideoMessages(@Nullable @Nullable Boolean hasRestrictedVoiceAndVideoMessages) - Parameters:
hasRestrictedVoiceAndVideoMessages
- True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
-
getJoinToSendMessages
- Returns:
- True, if users need to join the supergroup before they can send messages. Returned only in getChat.
-
setJoinToSendMessages
- Parameters:
joinToSendMessages
- True, if users need to join the supergroup before they can send messages. Returned only in getChat.
-
getJoinByRequest
- Returns:
- True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
-
setJoinByRequest
- Parameters:
joinByRequest
- True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
-
getMessageAutoDeleteTime
- Returns:
- The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
-
setMessageAutoDeleteTime
- Parameters:
messageAutoDeleteTime
- The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
-
getHasProtectedContent
- Returns:
- Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
-
setHasProtectedContent
- Parameters:
hasProtectedContent
- Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
-
getLinkedChatId
- Returns:
- Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
-
setLinkedChatId
- Parameters:
linkedChatId
- Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
-
getLocation
- Returns:
- Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
-
setLocation
- Parameters:
location
- Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
-
toString
-