blob: 0acb76ea9933989c2985746eb5644fa7372cca0b (
plain) (
tree)
|
|
defmodule Nola do
@default_brand [
name: "Nola,
source_url: "https://phab.random.sh/source/Bot/",
owner: "Ashamed owner",
owner_email: "contact@my.nola.bot"
]
def env(), do: Application.get_env(:nola)
def env(key, default \\ nil), do: Application.get_env(:nola, key, default)
def brand(), do: env(:brand, @default_brand)
def brand(key), do: Keyword.get(brand(), key)
def name(), do: brand(:name)
def source_url(), do: brand(:source_url)
def data_path(suffix) do
Path.join(data_path(), suffix)
end
def data_path do
Application.get_env(:nola, :data_path)
end
def version do
Application.spec(:nola)[:vsn]
end
end
|