more random recipes

This commit is contained in:
reality 2015-04-23 15:37:42 +00:00
parent 19442bfe8f
commit 15de4c4f5d

View File

@ -35,9 +35,11 @@ var food = function(dbot) {
this.listener = function(event) { this.listener = function(event) {
var match = event.message.match(new RegExp(dbot.config.name + ': what should i (have|eat|make)\\??( for (dinner|lunch|breakfast))?\\??', 'i')); var match = event.message.match(new RegExp(dbot.config.name + ': what should i (have|eat|make)\\??( for (dinner|lunch|breakfast))?\\??', 'i'));
if(match) { if(match) {
var page = _.random(0, 200);
request.get('http://food2fork.com/api/search', { request.get('http://food2fork.com/api/search', {
'qs': { 'qs': {
'key': this.config.api_key, 'key': this.config.api_key,
'page': page
}, },
'json': true 'json': true
}, function(error, response, body) { }, function(error, response, body) {