Interface AddBotSecondaryUsername

Adds a secondary username to a bot. Can be called only if userTypeBot.can_be_edited, the bot has no secondary username and the current user has Telegram Premium subscription. May return an error with a message "OWNER_USERNAMES_LIMIT_EXCEEDED" if the current user already owns at least getOption("secondary_bot_username_count_max") bots with a secondary username. Request type for Tdjson#addBotSecondaryUsername.

interface AddBotSecondaryUsername {
    @type: "addBotSecondaryUsername";
    bot_user_id: number;
    username: string;
}

Properties

@type: "addBotSecondaryUsername"
bot_user_id: number

Identifier of the target bot.

username: string

The new secondary username; must be non-empty. Use checkBotUsername to check username validness.