Class 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
    Identifier uniquely determining type of the object.
    long
    Identifier of the bot that will manage the created bot.
    Name of the bot; 1-64 characters.
    Username of the bot.
    boolean
    Pass true if the bot is created from an internalLinkTypeRequestManagedBot link.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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
    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.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • 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