мини фиксы

This commit is contained in:
Artem Tsyrulnikov
2026-02-18 20:21:38 +03:00
parent 189a4634e3
commit e48cd7bccc
8 changed files with 37 additions and 40 deletions

View File

@@ -34,6 +34,13 @@ func main() {
// Регистрируем команды бота в Telegram
api := echotron.NewAPI(botToken)
if me, err := api.GetMe(); err != nil {
log.Error().Err(err).Msg("Failed to get bot profile")
} else if me.Result != nil {
bot.SetBotUsername(me.Result.Username)
log.Info().Str("username", me.Result.Username).Msg("Telegram bot authorized")
}
if _, err := api.SetMyCommands(nil, botCommands...); err != nil {
log.Error().Err(err).Msg("Failed to set bot commands")
} else {