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
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class BlackjackCommand extends Command {
});
}
async run(msg, { deckCount }) { // eslint-disable-line complexity
async run(msg, { deckCount }) {
const current = this.client.games.get(msg.channel.id);
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
try {
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class HangmanCommand extends Command {
});
}
async run(msg) { // eslint-disable-line complexity
async run(msg) {
const current = this.client.games.get(msg.channel.id);
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
this.client.games.set(msg.channel.id, { name: this.name });