bots.createBot
Create a managed bot » owned by the current user and controlled by the specified manager bot.
Create a [managed bot »](https://core.telegram.org/api/bots/managed-bots.md#creating-a-managed-bot) owned by the current user and controlled by the specified manager bot.
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
via_deeplink | true | لأ | Set only if the creation prompt was opened from a [managed bot creation request deep link »](https://core.telegram.org/api/links.md#managed-bot-creation-request-links) |
name | string | أيوه | Display name of the bot, 1–64 characters |
username | string | أيوه | Username for the bot, as validated by [bots.checkUsername](https://core.telegram.org/method/bots.checkUsername.md) |
manager_id | InputUser | أيوه | The manager bot that will control the created bot; must have the [user](https://core.telegram.org/constructor/user.md).`bot_can_manage_bots` flag set |
الردود
User
MTProto RPC
- 400 · BOT_CREATE_LIMIT_EXCEEDED — The current user already owns the maximum allowed number of owned bots, as specified by [bots_create_limit_default »](https://core.telegram.org/api/config.md#bots-create-limit-default) and [bots_create_limit_premium »](https://core.telegram.org/api/config.md#bots-create-limit-premium); if the current user doesn't have Telegram Premium, upgrading to Premium will allow them to create more bots.
- 400 · MANAGER_INVALID — The specified manager bot is invalid.
- 400 · MANAGER_PERMISSION_MISSING — The specified manager bot does not have the [user](https://core.telegram.org/constructor/user.md).bot_can_manage_bots flag set.
- 400 · NAME_INVALID — The specified bot name is invalid.
- 400 · USERNAME_INVALID — The provided username is not valid.
- 400 · USERNAME_OCCUPIED — The provided username is already occupied.
- 400 · USERNAME_SUFFIX_MISSING — The required bot suffix is missing from the passed username.