 
 board = {}
 lists = {}
+members = {}
 
 Trello = require 'node-trello'
 

    trello.get "/1/boards/#{process.env.HUBOT_TRELLO_BOARD}/lists", (err, data) ->
      for list in data
        lists[list.name.toLowerCase()] = list

  robot.respond /trello new ["'](.+)["']\s(.*)/i, (msg) ->
    ensureConfig msg.send
    card_name = msg.match[2]
    list_name = msg.match[1]

      msg.reply "Sorry boss, I couldn't move that card after all." if err
      msg.reply "Yep, ok, I moved that card to #{list_name}." unless err

addDescription = (msg, card_id, desc) ->
  ensureConfig msg.send
  trello.put "/1/cards/#{card_id}/desc", {value: desc}, (err, data) ->
      msg.reply "Sorry boss, I couldn't update that card after all." if err
      msg.reply "Yep, ok, I updated that card for you." unless err

addComment = (msg,card_id, comment, usr) ->
  ensureConfig msg.send
  trello.post "/1/cards/#{card_id}/actions/comments",{text: usr+" commented via Slack:"+comment}, (err, data) ->
      msg.reply "Sorry, I was unable to do that." if err
      msg.reply "Gladly! That comment has been added" unless err

module.exports = (robot) ->
  # fetch our board data when the script is loaded
  ensureConfig console.log
