From b3c92205d97d7799da2bc302965d61a11f43f27c Mon Sep 17 00:00:00 2001 From: MadlyDan Date: Fri, 27 Mar 2015 15:18:21 +0000 Subject: [PATCH] Create google.js --- google.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 google.js diff --git a/google.js b/google.js new file mode 100644 index 0000000..ad42bac --- /dev/null +++ b/google.js @@ -0,0 +1,10 @@ +var action = function(client, from, to, text, message) { + var q = text.split(/ (.+)/)[1]; + if (!q || q.length == 0) { + return 'no keyword given, Silly ass'; + } + + return 'http://google.com/search?q=' + escape(q); +}; + +module.exports = action;