 #   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.

htmlStrip = require 'htmlstrip-native'

SEARCH_URL = 'https://www.google.com/search'
# this gets the correct page structure, needs to be slimmed down
USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36'

module.exports = (robot) ->
  getQueryUrl = (version, query) ->

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

