Merge branch 'master' of github.com:reality/dbot

This commit is contained in:
reality 2013-08-24 13:56:53 +00:00
commit 13ff92899c

View File

@ -153,10 +153,14 @@ var imgur = function(dbot) {
this.commands = {
'~ri': function(event) {
var local = event.user;
if(event.params[1]) {
local = event.params.splice(1, event.params.length - 1).join(' ').trim();
}
this.api.getRandomImage(function(link, slug) {
this.api.getImageInfo(slug, function(imgData) {
var info = this.internalAPI.infoString(imgData);
event.reply(event.user + ': ' + link + ' [' + info + ']');
event.reply(local + ': ' + link + ' [' + info + ']');
}.bind(this));
}.bind(this));
}