Class KeyboardButtonRequestChat
java.lang.Object
io.github.natanimn.telebof.types.keyboard.KeyboardButtonRequestChat
- All Implemented Interfaces:
- Serializable
This object defines the criteria used to request a suitable chat.
 Information about the selected chat will be shared with the bot when the corresponding button is pressed.
 The bot will be granted requested rights in the chat if appropriate.
- Since:
- 3 March 2025, More about requesting chats ยป.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbotAdministratorRights(ChatAdministratorRights bot_administrator_rights) OptionalbotIsMember(boolean bot_is_member) OptionalchatHasUsername(boolean chat_has_username) OptionalchatIsCreated(boolean chat_is_created) OptionalchatIsForum(boolean chat_is_forum) OptionalrequestPhoto(boolean request_photo) OptionalrequestTitle(boolean request_title) OptionalrequestUsername(boolean request_username) OptionaluserAdministratorRights(ChatAdministratorRights user_administrator_rights) Optional
- 
Constructor Details- 
KeyboardButtonRequestChatpublic KeyboardButtonRequestChat(int request_id, boolean chat_is_channel) Required- Parameters:
- request_id- Signed 32-bit identifier of the request, which will be received back in the- ChatSharedobject. Must be unique within the message
- chat_is_channel- Pass True to request a channel chat, pass False to request a group or a supergroup chat.
 
 
- 
- 
Method Details- 
chatIsForumOptional- Parameters:
- chat_is_forum- Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
- Returns:
- KeyboardButtonRequestChat
 
- 
chatHasUsernameOptional- Parameters:
- chat_has_username- Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
- Returns:
- KeyboardButtonRequestChat
 
- 
chatIsCreatedOptional- Parameters:
- chat_is_created- Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
- Returns:
- KeyboardButtonRequestChat
 
- 
userAdministratorRightspublic KeyboardButtonRequestChat userAdministratorRights(ChatAdministratorRights user_administrator_rights) Optional- Parameters:
- user_administrator_rights- A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
- Returns:
- KeyboardButtonRequestChat
 
- 
botAdministratorRightspublic KeyboardButtonRequestChat botAdministratorRights(ChatAdministratorRights bot_administrator_rights) Optional- Parameters:
- bot_administrator_rights- A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of- userAdministratorRights(ChatAdministratorRights). If not specified, no additional restrictions are applied.
- Returns:
- KeyboardButtonRequestChat
 
- 
botIsMemberOptional- Parameters:
- bot_is_member- Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
- Returns:
- KeyboardButtonRequestChat
 
- 
requestTitleOptional- Parameters:
- request_title- Pass True to request the chat's title
- Returns:
- KeyboardButtonRequestChat
 
- 
requestUsernameOptional- Parameters:
- request_username- Pass True to request the chat's username
- Returns:
- KeyboardButtonRequestChat
 
- 
requestPhotoOptional- Parameters:
- request_photo- Pass True to request the chat's photo
- Returns:
- KeyboardButtonRequestChat
 
 
-