Interactive /mybots menu for @BotFather

Button-driven bot management: paginated picker, per-bot API token /
revoke, Edit Bot (name/description/about/commands/botpic), Bot Settings
toggles (inline/groups/privacy), and delete. Navigation edits the menu
message in place via a new editServiceBotMessage helper.

Edit Botpic accepts a photo the user sends to @BotFather and sets it as
the bot's profile photo (new files.SetAvatarFromExistingPhoto, wired
through bots.SetBotUserpic / WithBotAvatarStore); photos.uploadProfilePhoto
does not accept a bot target so this is the only route.
This commit is contained in:
Astra 2026-09-08 13:31:05 +01:00
parent 196f90f9b1
commit f474a360d7
10 changed files with 1467 additions and 26 deletions

View file

@ -359,6 +359,10 @@ func (s *Service) OnCallbackQuery(ctx context.Context, query domain.BotCallbackQ
// (verifierbot.go).
return s.onVerifierCallback(ctx, query)
}
if query.BotUserID == domain.BotFatherUserID {
// @BotFather's button-driven /mybots menu (mybots.go).
return s.onBotFatherCallback(ctx, query)
}
if query.BotUserID != domain.VerifyBotUserID {
// The other built-in bots never attach an inline keyboard, so there is
// nothing to route. An empty answer still beats hanging the click for the