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