-<<<<<<< HEAD
 # Description:
 #   Manage your Trello Board from Hubot!
 #

     id = members[member_name.toLowerCase()].username
  msg.send "Unable to find person named: #{user_name}" unless id?
  if id?
    trello.get "/1/search", {query: "@"+id, idBoards: board.id, modelTypes: "cards", card_fields: "name,shortLink,url"}, (err, data) ->
      msg.reply "So sorry, I got an error and cannot give you that information" if err
      msg.reply "I got the following cards for you" unless err
      for cards in data.cards
        msg.send " * " + cards.name+ " | " + cards.url
        
search = (msg, search) ->
  if (search?)
    msg.reply "I'm searching for results now"
    trello.get "/1/search", {query: search, idBoards: board.id, modelTypes:"cards", card_fields: "name,shortLink,url"}, (err, data) ->
      msg.reply "Sorry, I was unable to search at this time. Please try again later." if err
      msg.reply "The following cards match your criteria" unless err
      for cards in data.cards
         msg.send " * " + cards.name + " | " + cards.url


moveCard = (msg, card_id, list_name) ->

    msg.send " *  trello move <card.shortlink> \"<ListName>\""
    msg.send " *  trello list lists"
    msg.send " *  trello list member id <name>"
    msg.send " *  trello add member <card.shortLink> <Name>"
    msg.send " *  trello comment <card.shortLink> <Comment>"
    msg.send " *  trello description <card.shortLink> <Description>"
