feat: move default term acquisition & season range from global into config state, LoadLocation once, remove bare constants

This commit is contained in:
2025-08-26 11:53:29 -05:00
parent 5a722d16c6
commit 95e760c549
5 changed files with 48 additions and 42 deletions

View File

@@ -32,7 +32,7 @@ func (b *Bot) SetClosing() {
// GetSession ensures a valid session is available and selects the default term.
func (b *Bot) GetSession() (string, error) {
sessionID := b.API.EnsureSession()
term := api.Default(time.Now()).ToString()
term := b.API.DefaultTerm(time.Now()).ToString()
log.Info().Str("term", term).Str("sessionID", sessionID).Msg("Setting selected term")
err := b.API.SelectTerm(term, sessionID)