Commit 4cc8c46
feat: Managed Bots support (Bot API 9.6)
Adds the types and methods for Telegram's Managed Bots feature, introduced
in Bot API 9.6 (April 2026): a bot with can_manage_bots can create and
control other bots via its own Bot API token, without BotFather's manual
/newbot flow or a separate credential per bot.
- User.CanManageBots (getMe)
- Update.ManagedBot / ManagedBotUpdated (creation, token update, or owner
update of a managed bot)
- Message.ManagedBotCreated / ManagedBotCreated (service message for bot
creation)
- BotAPI.GetManagedBotToken(userID) — fetch a managed bot's current token
- BotAPI.ReplaceManagedBotToken(userID) — rotate a managed bot's token
Doesn't add KeyboardButtonRequestManagedBot or savePreparedKeyboardButton
(the Mini App integration half of the same API bump) — happy to extend this
PR or follow up separately if there's interest.1 parent 4126fa6 commit 4cc8c46
2 files changed
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| |||
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
| |||
563 | 573 | | |
564 | 574 | | |
565 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
566 | 581 | | |
567 | 582 | | |
568 | 583 | | |
| |||
1181 | 1196 | | |
1182 | 1197 | | |
1183 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1184 | 1215 | | |
1185 | 1216 | | |
1186 | 1217 | | |
| |||
0 commit comments