mirror of
https://github.com/Xevion/banner.git
synced 2025-12-14 22:11:04 -06:00
feat: move default term acquisition & season range from global into config state, LoadLocation once, remove bare constants
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user