Beta server and role come from the dashboard

The owner sets them on the admin page; the bot polls the shared beta_settings
row (30s) and moves the beta commands if the server changes. BETA_* env vars
are gone.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
FernandoJVideiraandClaude Sonnet 5.5 committed 2026-10-23 00:55:09 +01:00
1 parent a364435bab
commit 1ee6280d91
7 files changed
+157 -24

No files matched your search

-14
View File
@@ -7,16 +7,10 @@ import (
"github.com/joho/godotenv"
)
// DefaultBetaGuildID is the server that beta features are tried in, unless
// BETA_GUILD_ID says otherwise.
const DefaultBetaGuildID = "1170934850157547600"
type Config struct {
BotToken string
AppID string
GuildID string
BetaGuildID string // BETA_GUILD_ID: where beta features exist
BetaRoleID string // BETA_ROLE_ID: the Beta Tester role; empty keeps beta features locked for everyone
DBHost string
LavalinkHost string
LavalinkPass string
@@ -39,12 +33,6 @@ func LoadConfig() (*Config, error) {
guildID := os.Getenv("GUILD_ID")
betaGuildID := os.Getenv("BETA_GUILD_ID")
if betaGuildID == "" {
betaGuildID = DefaultBetaGuildID
}
betaRoleID := os.Getenv("BETA_ROLE_ID")
dbHost := os.Getenv("DB_HOST")
if dbHost == "" {
return nil, fmt.Errorf("DB_HOST is not set")
@@ -62,8 +50,6 @@ func LoadConfig() (*Config, error) {
BotToken: token,
AppID: appID,
GuildID: guildID,
BetaGuildID: betaGuildID,
BetaRoleID: betaRoleID,
DBHost: dbHost,
LavalinkHost: lavalinkHost,
LavalinkPass: lavalinkPass,