aboutsummaryrefslogtreecommitdiff
path: root/commands/games/battleship.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/games/battleship.js')
-rw-r--r--commands/games/battleship.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/games/battleship.js b/commands/games/battleship.js
index 2d71f03..136124a 100644
--- a/commands/games/battleship.js
+++ b/commands/games/battleship.js
@@ -164,7 +164,8 @@ module.exports = {
if(bttl_db.length==0)
return args.message.reply({content:"id not found!",ephemeral:true})
}
- let game_test = db.BattleShip.findAll({where:{p1_id:args.message.author.id,status:"open"}})
+ let game_test = await db.BattleShip.findAll({where:{p1_id:args.message.author.id,status:"open"}})
+
if(game_test.length!=0)
return args.message.reply({content:"you are already in a game!",ephemeral:true})