diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-08 08:45:15 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-08 08:45:15 -0400 |
| commit | 7ccdb63fb7f4008b7d785c687b4f55b6b4291483 (patch) | |
| tree | b1c342020429e1b4acf4d8d1e84fde26e4a4d3f8 /config/config.exs | |
| parent | 5b639185cca5a2d1dc18c99699065e8a5623dbf1 (diff) | |
adding and posting images working
Diffstat (limited to 'config/config.exs')
| -rw-r--r-- | config/config.exs | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/config/config.exs b/config/config.exs index cfd4263..206f883 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,7 +1,6 @@ import Config config :nostrum, - token: "NTM4MjA0NTYyMTU1MjQxNDgz.GHroNu.1j6C5W5ZrBDBsNcWyPJLAOtpCe0tJr3rPcj0iY", gateway_intents: [ :guild_messages, :guild_message_reactions, @@ -17,7 +16,32 @@ config :logger, :console, format: "[$level] $message ($metadata)\n", metadata: [:module] -config :thulani, Thulani.Repo, - database: "memes", - username: "thulani", - hostname: "localhost" +if config_env() != :prod && is_nil(Application.get_env(:thulani, :prefix)) do + config :thulani, + prefix: [ + "!thulani ", + "!thulando ", + "!thulani madondo ", + "!thulan ", + "!thulando madondo " + ], + restricted: [ + "!todd ", + "!toddlani ", + "!toddbert " + ] +end + +common_prefixes = Application.get_env(:thulani, :prefix, ["!thulani "]) +restricted_prefixes = Application.get_env(:thulani, :restricted, []) + +wrap_list = fn x -> + if is_list(x) do + x + else + [x] + end +end + +config :nosedrum, + prefix: wrap_list.(common_prefixes) ++ wrap_list.(restricted_prefixes) |
