mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
ok i fixed it
This commit is contained in:
parent
3ce44418e7
commit
de3eb90ab5
@ -25,6 +25,7 @@ var quotes = function(dbot) {
|
|||||||
interQuote = '';
|
interQuote = '';
|
||||||
}
|
}
|
||||||
quote = quote.replace('~~' + ref + '~~', interQuote);
|
quote = quote.replace('~~' + ref + '~~', interQuote);
|
||||||
|
console.log('lol');
|
||||||
this.internalAPI.interpolatedQuote(server, channel, key, quote, callback);
|
this.internalAPI.interpolatedQuote(server, channel, key, quote, callback);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
@ -82,25 +82,23 @@ var api = function(dbot) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
'getRandomChannelUser': function(server, channel, callback) {
|
'getRandomChannelUser': function(server, cName, callback) {
|
||||||
var channel;
|
var channel;
|
||||||
this.db.search('channel_users', {
|
this.db.search('channel_users', {
|
||||||
'server': server,
|
'server': server,
|
||||||
'channel': channel
|
'name': cName
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
channel = result;
|
channel = result;
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if(!err) {
|
if(!err && channel) {
|
||||||
if(!_.isUndefined(channel.users)) {
|
if(!_.isUndefined(channel.users)) {
|
||||||
var randomUser = channel.users[_.random(0, channel.users.length - 1)];
|
var randomUser = channel.users[_.random(0, channel.users.length - 1)];
|
||||||
this.api.resolveUser(server, randomUser, function(user) {
|
this.api.getUser(randomUser, callback);
|
||||||
callback(user);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
callback(false);
|
callback(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
'getAllUsers': function(callback) {
|
'getAllUsers': function(callback) {
|
||||||
|
Loading…
Reference in New Issue
Block a user