forked from GitHub/dbot
Merge branch 'master' of github.com:reality/dbot
This commit is contained in:
commit
13ff92899c
@ -153,10 +153,14 @@ var imgur = function(dbot) {
|
|||||||
|
|
||||||
this.commands = {
|
this.commands = {
|
||||||
'~ri': function(event) {
|
'~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.getRandomImage(function(link, slug) {
|
||||||
this.api.getImageInfo(slug, function(imgData) {
|
this.api.getImageInfo(slug, function(imgData) {
|
||||||
var info = this.internalAPI.infoString(imgData);
|
var info = this.internalAPI.infoString(imgData);
|
||||||
event.reply(event.user + ': ' + link + ' [' + info + ']');
|
event.reply(local + ': ' + link + ' [' + info + ']');
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user