fix error on !list when bridge client is not connected
This commit is contained in:
parent
4d99f27b61
commit
2277fba410
|
@ -8,6 +8,11 @@ module.exports = {
|
|||
message.reply(`Use this in a bridged room to see who is at the other side.`);
|
||||
return;
|
||||
}
|
||||
var client = clients[row.site][row.mpp_room];
|
||||
if (!client || !client.isConnected()) {
|
||||
message.reply(`This bridge is not connected.`);
|
||||
return;
|
||||
}
|
||||
var ppl = clients[row.site][row.mpp_room].ppl;
|
||||
|
||||
var numberOfPpl = Object.keys(ppl).length;
|
||||
|
@ -20,4 +25,4 @@ module.exports = {
|
|||
str += names.join(', ');
|
||||
message.channel.send(str, {split:{char:''}});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue