 #   LioBot gets you tip top information from the Laravel or PHP documentation
 #
 # Commands:
-#   !docs <version?> <query> - Perform a Google search against Laravel or PHP
+#   <nick?> !docs <version?> <query> - Perform a Google search against Laravel or PHP
 #       docs for <query>, version can be a numeric version number, 'api' to
 #       search the api docs, 'php' to search the PHP docs, or blank for
 #       the latest Laravel docs pages.

      "site:laravel.com/api/4.1 #{query}"
    else if version == 'php'
      "site:www.php.net/manual/en #{query}"
    else if version?
      "site:laravel.com/docs/#{version} #{query}"
    else
      "site:laravel.com/docs #{query}"


      if !version?
        version = ''
      else if version.length > 1
        version = version.replace(/[\.]/g, "-").substr(0, 3)
      else if version == '4'
        version = ''

    fetchResult getQueryUrl(version, query), (url) ->
      return msg.send "No results for \"#{query}\"" unless url

      response = url
      response = "#{user}: #{response}" if user

      if version == 'php' and /function/.test url
        robot.http(url).get() (err, res, body) ->
          $ = cheerio.load body
          methodSigContent = htmlStrip.html_strip $('.methodsynopsis').html(), compact_whitespace : true
          msg.send "#{response} | #{methodSigContent}"
      else
          msg.send response
