mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
Only allow phone calls to one channel at a time
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user