Package org.drinkless.tdlib

# Class TdApi.CreateBot

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.User>
org.drinkless.tdlib.TdApi.CreateBot

Enclosing class:
  `TdApi`

public static class TdApi.CreateBot extends TdApi.Function<TdApi.User>
Creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message "BOT_CREATE_LIMIT_EXCEEDED" if the user already owns the maximum allowed number of bots as per premiumLimitTypeOwnedBotCount. An internal link "https://t.me/BotFather?start=deletebot" can be processed to handle the error.

Returns `User`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `managerBotUserId`
  Identifier of the bot that will manage the created bot.
  `String`
  `name`
  Name of the bot; 1-64 characters.
  `String`
  `username`
  Username of the bot.
  `boolean`
  `viaLink`
  Pass true if the bot is created from an internalLinkTypeRequestManagedBot link.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CreateBot()`
  Default constructor for a function, which creates a bot which will be managed by another bot.
  `CreateBot(long managerBotUserId, String name, String username, boolean viaLink)`
  Creates a function, which creates a bot which will be managed by another bot.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### managerBotUserId

    public long managerBotUserId
    Identifier of the bot that will manage the created bot.

  - ### name

    public String name
    Name of the bot; 1-64 characters.

  - ### username

    public String username
    Username of the bot. The username must end with "bot". Use checkBotUsername to find whether the name is suitable.

  - ### viaLink

    public boolean viaLink
    Pass true if the bot is created from an internalLinkTypeRequestManagedBot link.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CreateBot

    public CreateBot()
    Default constructor for a function, which creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message "BOT_CREATE_LIMIT_EXCEEDED" if the user already owns the maximum allowed number of bots as per premiumLimitTypeOwnedBotCount. An internal link "https://t.me/BotFather?start=deletebot" can be processed to handle the error.

    Returns `User`

  - ### CreateBot

    public CreateBot(long managerBotUserId, String name, String username, boolean viaLink)
    Creates a function, which creates a bot which will be managed by another bot. Returns the created bot. May return an error with a message "BOT_CREATE_LIMIT_EXCEEDED" if the user already owns the maximum allowed number of bots as per premiumLimitTypeOwnedBotCount. An internal link "https://t.me/BotFather?start=deletebot" can be processed to handle the error.

    Returns `User`

    Parameters:
      `managerBotUserId` - Identifier of the bot that will manage the created bot.
      `name` - Name of the bot; 1-64 characters.
      `username` - Username of the bot. The username must end with "bot". Use checkBotUsername to find whether the name is suitable.
      `viaLink` - Pass true if the bot is created from an internalLinkTypeRequestManagedBot link.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.User>`
    Returns:
      this.CONSTRUCTOR