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