Skellington-Closet / skellington

:sparkles::skull::sparkles: The skeleton for your bots
MIT License
64 stars 6 forks source link

Change config structure #21

Closed colestrode closed 7 years ago

colestrode commented 7 years ago

Right now Skellington and botkit configs are mixed together in the same flattened config structure. I think we should break out the botkit specific configs into their own stanza, something like:

{
  "slackToken": "xob-abc-123",
  "plugins": [...],
  "botkit": {
    //botkit specific configs go here
  }
}

This will simplify the logic of passing configs to botkit and prevents collisions from future config options. It leaves the door open for different implementations in the future.

@jasonrhodes had a thought to make the key dynamic using a botType option:

{
  "botType": "botkit", // default to botkit
  "botkit": { ... botkit configs ... }
}

This will make it easy to switch config types in the future and support different underlying implementations.

Something to consider: whatever the underlying implementation it would be great to make sure the plugin API stays in tact. Not sure that's possible if we switch out the underlying implementation. We will probably need an adapter layer... but that's a discussion for another day.

colestrode commented 7 years ago

closed in #23