Only allow phone calls to one channel at a time

This commit is contained in:
Dragon Fire
2020-05-18 11:57:43 -04:00
parent efe4ffdd4d
commit 9210ada744
6 changed files with 12 additions and 8 deletions
+4
View File
@@ -33,4 +33,8 @@ module.exports = class XiaoClient extends CommandoClient {
this.activities = activities;
this.leaveMessages = leaveMsgs;
}
inPhoneCall(channel) {
return this.phone.some(call => call.origin.id === channel.id || call.recipient.id === channel.id);
}
};