aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/thulani_bot/lib/thulani/bot/application.ex7
-rw-r--r--apps/thulani_bot/lib/thulani/bot/config.ex5
2 files changed, 11 insertions, 1 deletions
diff --git a/apps/thulani_bot/lib/thulani/bot/application.ex b/apps/thulani_bot/lib/thulani/bot/application.ex
index 8ab6e90..7507eb8 100644
--- a/apps/thulani_bot/lib/thulani/bot/application.ex
+++ b/apps/thulani_bot/lib/thulani/bot/application.ex
@@ -2,9 +2,14 @@ defmodule Thulani.Bot.Application do
alias Thulani.Bot.Config
use Application
+ @applications [
+ :nostrum
+ ]
+
def start(_type, _args) do
Config.init!()
- Application.start(:nostrum)
+
+ Enum.each(@applications, fn a -> Application.start(a) end)
children = []
diff --git a/apps/thulani_bot/lib/thulani/bot/config.ex b/apps/thulani_bot/lib/thulani/bot/config.ex
index d93e8d1..e57dbe2 100644
--- a/apps/thulani_bot/lib/thulani/bot/config.ex
+++ b/apps/thulani_bot/lib/thulani/bot/config.ex
@@ -1,4 +1,9 @@
defmodule Thulani.Bot.Config do
+ # note: we actively don't want to use a config provider, since it only works in a release.
+ # we want to be able to *always* assume the config is going to be found in the environment and parse it
+ # ourselves. kind of sucks that we have to start all the applications we want to run ourselves, but that's just
+ # the way it has to be.
+
@env_vars %{
database_url: nil,
spreadsheet_id: nil,