Interface CreateBot

Creates a bot that 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. Request type for Tdjson#createBot.

interface CreateBot {
    @type: "createBot";
    manager_bot_user_id: number;
    name: string;
    username: string;
    via_link?: boolean;
}

Properties

@type: "createBot"
manager_bot_user_id: number

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" or a string from updateAllowedBotUsernamePremiumSuffixes, case-insensitive. Use checkBotUsername to find whether the name is suitable. If the username doesn't end with "bot", then the current user must have a Telegram Premium subscription, the chosen username will be assigned as secondary and an additional regular username ending with "bot" will be automatically assigned to the created bot.

via_link?: boolean

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