Module tdlight.api

Class TdApi.KeyboardButtonTypeRequestUser

Enclosing class:
TdApi

public static final class TdApi.KeyboardButtonTypeRequestUser extends TdApi.KeyboardButtonType
A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request.
  • Field Details

    • id

      public int id
      Unique button identifier.
    • restrictUserIsBot

      public boolean restrictUserIsBot
      True, if the shared user must or must not be a bot.
    • userIsBot

      public boolean userIsBot
      True, if the shared user must be a bot; otherwise, the shared user must no be a bot. Ignored if restrictUserIsBot is false.
    • restrictUserIsPremium

      public boolean restrictUserIsPremium
      True, if the shared user must or must not be a Telegram Premium user.
    • userIsPremium

      public boolean userIsPremium
      True, if the shared user must be a Telegram Premium user; otherwise, the shared user must no be a Telegram Premium user. Ignored if restrictUserIsPremium is false.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • KeyboardButtonTypeRequestUser

      public KeyboardButtonTypeRequestUser()
      A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request.
    • KeyboardButtonTypeRequestUser

      public KeyboardButtonTypeRequestUser(int id, boolean restrictUserIsBot, boolean userIsBot, boolean restrictUserIsPremium, boolean userIsPremium)
      A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request.
      Parameters:
      id - int Unique button identifier.
      restrictUserIsBot - boolean True, if the shared user must or must not be a bot.
      userIsBot - boolean True, if the shared user must be a bot; otherwise, the shared user must no be a bot. Ignored if restrictUserIsBot is false.
      restrictUserIsPremium - boolean True, if the shared user must or must not be a Telegram Premium user.
      userIsPremium - boolean True, if the shared user must be a Telegram Premium user; otherwise, the shared user must no be a Telegram Premium user. Ignored if restrictUserIsPremium is false.
    • KeyboardButtonTypeRequestUser

      public KeyboardButtonTypeRequestUser(DataInput input) throws IOException
      A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request.
      Throws:
      IOException
  • Method Details