diff options
Diffstat (limited to 'apps/thulani_bot/lib')
| -rw-r--r-- | apps/thulani_bot/lib/thulani/bot/application.ex | 1 | ||||
| -rw-r--r-- | apps/thulani_bot/lib/thulani/bot/config.ex | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/apps/thulani_bot/lib/thulani/bot/application.ex b/apps/thulani_bot/lib/thulani/bot/application.ex index 63bd89e..8ab6e90 100644 --- a/apps/thulani_bot/lib/thulani/bot/application.ex +++ b/apps/thulani_bot/lib/thulani/bot/application.ex @@ -4,6 +4,7 @@ defmodule Thulani.Bot.Application do def start(_type, _args) do Config.init!() + Application.start(:nostrum) children = [] diff --git a/apps/thulani_bot/lib/thulani/bot/config.ex b/apps/thulani_bot/lib/thulani/bot/config.ex index 5542752..d93e8d1 100644 --- a/apps/thulani_bot/lib/thulani/bot/config.ex +++ b/apps/thulani_bot/lib/thulani/bot/config.ex @@ -11,7 +11,7 @@ defmodule Thulani.Bot.Config do require Logger - def init!() do + def init! do load_env() |> Enum.each(fn {application, vals} -> Enum.each(vals, fn {key, val} -> Application.put_env(application, key, val) end) @@ -22,9 +22,7 @@ defmodule Thulani.Bot.Config do end end - def load_env() do - if Application.get_env(:thulani, :env) == :dev, do: load_dotenv() - + def load_env do %{ nostrum: [ token: System.fetch_env!("THULANI_TOKEN"), @@ -54,5 +52,4 @@ defmodule Thulani.Bot.Config do {env_var, value} end) end - end |
