Support multiple configurations of the same adapter
enilsen16 opened this issue · 1 comments
enilsen16 commented
For example --
config :eva, Eva.Robot,
adapter: Hedwig.Adapters.Slack,
name: "Ava",
aka: "/",
token: "",
# for now, you can invite your bot to a channel in slack and it will join
# automatically
rooms: [],
responders: [
{Hedwig.Responders.Help, []},
{Hedwig.Responders.GreatSuccess, []},
{Hedwig.Responders.ShipIt, []}
]
config :eva, Eva.Robot,
adapter: Hedwig.Adapters.Slack,
name: "Eva",
aka: "/",
# fill in the appropriate API token for your bot
token: "",
# for now, you can invite your bot to a channel in slack and it will join
# automatically
rooms: [],
responders: [
{Hedwig.Responders.Help, []},
{Hedwig.Responders.GreatSuccess, []},
{Hedwig.Responders.ShipIt, []}
]
scrogson commented
Hi @enilsen16,
Hedwig already supports dynamic configuration at runtime. Check out this section in the README. I believe the only thing that is compile-time is the adapter. So you can simply pass in a name: "Eva"
into the options and it will be merged with the what's in your config.
What you are suggesting is just not possible.