Binding to the DEBUG environment variable is not necessary

This commit is contained in:
Ryan Cavicchioni 2022-09-08 02:23:38 -05:00
parent a151b08142
commit 2ac0df3494
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -76,7 +76,7 @@ func (b *Bot) RegisterHandlers() {
} }
func Run() error { func Run() error {
setupConfig() initConfig()
if err := lib.SeedMathRand(); err != nil { if err := lib.SeedMathRand(); err != nil {
log.Warn(err) log.Warn(err)
@ -115,7 +115,7 @@ func Run() error {
return nil return nil
} }
func setupConfig() { func initConfig() {
var err error var err error
C = NewConfig() C = NewConfig()
@ -127,7 +127,8 @@ func setupConfig() {
viper.SetConfigType("toml") viper.SetConfigType("toml")
viper.AddConfigPath(".") viper.AddConfigPath(".")
viper.BindEnv("DEBUG") viper.SetDefault("debug", false)
viper.BindEnv("DISCORD_TOKEN") viper.BindEnv("DISCORD_TOKEN")
viper.BindEnv("OPEN_WEATHER_MAP_TOKEN") viper.BindEnv("OPEN_WEATHER_MAP_TOKEN")