createBot¶
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 getOption("owned_bot_count_max"). An internal link "https://t.me/BotFather?start=deletebot" can be processed to handle the error
createBot(
manager_bot_user_id: int53,
name: string,
username: string,
via_link: Bool
) → User
manager_bot_user_id¶
int53
Identifier of the bot that will manage the created bot
name¶
string
Name of the bot; 1-64 characters
username¶
string
Username of the bot. The username must end with "bot". Use checkBotUsername to find whether the name is suitable
via_link¶
Bool
Pass true if the bot is created from an internalLinkTypeRequestManagedBot link