create_managed_bot()¶
- Client.create_managed_bot()
Create a new bot managed by a manager bot.
Usable by Users Bots
- Parameters:
name (
str) – Display name of the new bot (1-64 characters).username (
str) – Username of the new bot without the @ symbol (5-32 characters).manager_id (
int, optional) – Identifier of the manager user or bot. Defaults to the current user.via_deeplink (
bool, optional) – Pass True if the creation was initiated via a deep link.
- Returns:
User– On success, the newly created bot user is returned.
Example
bot_user = await app.create_managed_bot( name="My Agent Bot", username="myagentbot" ) print(bot_user.id)