mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
~squestion
This commit is contained in:
parent
48ba900ea1
commit
30ffd22599
@ -174,6 +174,15 @@ var reddit = function(dbot) {
|
||||
});
|
||||
},
|
||||
|
||||
'~squestion': function(event) {
|
||||
this.api.getNewPosts('askscience', 0, function(err, posts) {
|
||||
if(!err) {
|
||||
var qPost = posts[_.random(0, posts.length - 1)];
|
||||
event.reply('Question: ' + qPost.title.trim());
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
'~addredditfeed': function(event) {
|
||||
var channel = event.input[1],
|
||||
subreddit = event.input[2].replace('r/', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user