Promote development → master (initial production release: pre-release line + Stage 18) #104

Merged
developer merged 307 commits from development into master 2026-06-22 05:05:48 +00:00
Showing only changes of commit b22b624d28 - Show all commits
+6 -1
View File
@@ -103,6 +103,10 @@ func run(ctx context.Context, cfg config.BotConfig, logger *zap.Logger) error {
// bot-link, no gateway — so onboarding works even when the game is down. // bot-link, no gateway — so onboarding works even when the game is down.
var promo *promobot.Bot var promo *promobot.Bot
if cfg.PromoBotToken != "" { if cfg.PromoBotToken != "" {
// The promo bot is auxiliary and shares this process with the main bot, so its
// construction failure (a bad or unreachable promo token — tgbot.New validates it
// with getMe) is logged and the promo bot is skipped, never fatal: it must not
// take the main game bot down with it.
promo, err = promobot.New(promobot.Config{ promo, err = promobot.New(promobot.Config{
Token: cfg.PromoBotToken, Token: cfg.PromoBotToken,
APIBaseURL: cfg.APIBaseURL, APIBaseURL: cfg.APIBaseURL,
@@ -112,7 +116,8 @@ func run(ctx context.Context, cfg config.BotConfig, logger *zap.Logger) error {
SendRatePerSecond: cfg.SendRatePerSecond, SendRatePerSecond: cfg.SendRatePerSecond,
}, logger) }, logger)
if err != nil { if err != nil {
return err logger.Error("promo bot disabled: construction failed (the main bot is unaffected)", zap.Error(err))
promo = nil
} }
} }