hedwig-im/hedwig

Support multiple configurations of the same adapter

enilsen16 opened this issue · 1 comments

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, []}
  ]

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.