Module tdlight.api

Class TdApi.ShareChatWithBot

Enclosing class:
TdApi

public static final class TdApi.ShareChatWithBot extends TdApi.Function<TdApi.Ok>
Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot. Returns Ok
  • Field Details

    • chatId

      public long chatId
      Identifier of the chat with the bot.
    • messageId

      public long messageId
      Identifier of the message with the button.
    • buttonId

      public int buttonId
      Identifier of the button.
    • sharedChatId

      public long sharedChatId
      Identifier of the shared chat.
    • onlyCheck

      public boolean onlyCheck
      Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check botIsMember and botAdministratorRights restrictions. If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat. If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • ShareChatWithBot

      public ShareChatWithBot()
      Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot. Returns Ok
    • ShareChatWithBot

      public ShareChatWithBot(long chatId, long messageId, int buttonId, long sharedChatId, boolean onlyCheck)
      Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot. Returns Ok
      Parameters:
      chatId - long Identifier of the chat with the bot.
      messageId - long Identifier of the message with the button.
      buttonId - int Identifier of the button.
      sharedChatId - long Identifier of the shared chat.
      onlyCheck - boolean Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check botIsMember and botAdministratorRights restrictions. If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat. If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights.
    • ShareChatWithBot

      public ShareChatWithBot(DataInput input) throws IOException
      Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot. Returns Ok
      Throws:
      IOException
  • Method Details