diff --git a/.gitignore b/.gitignore index eaaf257..1147927 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +config.yaml discord-community .env diff --git a/main.go b/main.go index 82c561c..a1272fc 100644 --- a/main.go +++ b/main.go @@ -63,6 +63,7 @@ func main() { discord.Identify.Intents = discordgo.IntentsAll + var enabledModules int for _, mc := range config.ModuleConfigs { logger := log.WithField("module", mc.Type) mod := GetModuleByName(mc.Type) @@ -73,6 +74,14 @@ func main() { if err = mod.Initialize(crontab, discord, mc.Attributes); err != nil { logger.WithError(err).Fatal("Unable to initialize module") } + + enabledModules++ + logger.Debug("Enabled module") + } + + if enabledModules == 0 { + log.Warn("No modules were enabled, quitting now") + return } if err = discord.Open(); err != nil {