KeyboardButtonRequestUsers

@Serializable
data class KeyboardButtonRequestUsers(val requestId: Int, val userIsBot: Boolean? = null, val userIsPremium: Boolean? = null, val maxQuantity: Int? = null, val requestName: Boolean? = null, val requestUsername: Boolean? = null, val requestPhoto: Boolean? = null)

This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users: https://core.telegram.org/bots/features#chat-and-user-selection

Api reference

Constructors

Link copied to clipboard
constructor(requestId: Int, userIsBot: Boolean? = null, userIsPremium: Boolean? = null, maxQuantity: Int? = null, requestName: Boolean? = null, requestUsername: Boolean? = null, requestPhoto: Boolean? = null)

Properties

Link copied to clipboard
val maxQuantity: Int? = null

Optional. The maximum number of users to be selected; 1-10. Defaults to 1.

Link copied to clipboard

Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message

Link copied to clipboard
val requestName: Boolean? = null

Optional. Pass True to request the users' first and last names

Link copied to clipboard
val requestPhoto: Boolean? = null

Optional. Pass True to request the users' photos

Link copied to clipboard

Optional. Pass True to request the users' usernames

Link copied to clipboard
val userIsBot: Boolean? = null

Optional. Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.

Link copied to clipboard
val userIsPremium: Boolean? = null

Optional. Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.