forked from GitHub/dbot
more random recipes
This commit is contained in:
parent
19442bfe8f
commit
15de4c4f5d
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user