aboutsummaryrefslogtreecommitdiff
path: root/config/config.exs
blob: 206f8832ebf6e757d198feab49c1e4a8cc563882 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import Config

config :nostrum,
  gateway_intents: [
    :guild_messages,
    :guild_message_reactions,
    :message_content
  ]

config :logger,
  compile_time_purge_matching: [
    [application: :nostrum, level_lower_than: :warning]
  ]

config :logger, :console,
  format: "[$level] $message ($metadata)\n",
  metadata: [:module]

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)