aboutsummaryrefslogtreecommitdiff
path: root/apps/thulani_bot
diff options
context:
space:
mode:
Diffstat (limited to 'apps/thulani_bot')
-rw-r--r--apps/thulani_bot/lib/thulani/bot/application.ex1
-rw-r--r--apps/thulani_bot/lib/thulani/bot/config.ex7
-rw-r--r--apps/thulani_bot/mix.exs3
3 files changed, 4 insertions, 7 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
diff --git a/apps/thulani_bot/mix.exs b/apps/thulani_bot/mix.exs
index 13afa4f..9d3b6ae 100644
--- a/apps/thulani_bot/mix.exs
+++ b/apps/thulani_bot/mix.exs
@@ -24,8 +24,7 @@ defmodule Thulani.Bot.MixProject do
defp deps do
[
- # we look up the token based on an environment variable, so we can't do this
- {:nostrum, "~> 0.4"},
+ {:nostrum, "~> 0.4", runtime: false},
{:util, in_umbrella: true}
]
end