From ec2c7b087854222a7c079320127875739f40c49d Mon Sep 17 00:00:00 2001 From: Matt <58913953+ms5984@users.noreply.github.com> Date: Fri, 9 Sep 2022 22:07:40 -0400 Subject: [PATCH] Delegate to openBox(p) on count==1 --- src/commands/commandList/zoo/lootbox.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/commandList/zoo/lootbox.js b/src/commands/commandList/zoo/lootbox.js index 1a144f983..b062ed4a8 100644 --- a/src/commands/commandList/zoo/lootbox.js +++ b/src/commands/commandList/zoo/lootbox.js @@ -99,6 +99,10 @@ async function openMultiple(p,count){ if(count <= 0){ p.errorMsg(", you need to open at least one silly!",3000); return; + }else if (count==1) { + // delegate to openBox(p) + await openBox(p); + return; } let sql = `UPDATE IGNORE lootbox SET boxcount = boxcount - ${count} WHERE id = ${p.msg.author.id} AND boxcount >= ${count};`;