From 3d5a7b041d684e6ad2efe100c9144b2f3bdacfc5 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Wed, 22 Nov 2023 15:05:18 +0300 Subject: [PATCH] weapon inv stealing fix --- src/commands/attack.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/attack.ts b/src/commands/attack.ts index 0dad3a4..462d877 100644 --- a/src/commands/attack.ts +++ b/src/commands/attack.ts @@ -35,6 +35,8 @@ export default { const weapon = await getItem(weaponID); if (!weapon) return interaction.followUp('No such item exists!'); if (weapon.type !== 'weapon') return interaction.followUp('That is not a weapon!'); + const inv = await getItemQuantity(member.id, weapon.id); + if (inv.quantity === 0) return interaction.followUp('You do not have this weapon!'); const invinTimer = await getInvincibleMs(user.id); if (invinTimer > 0) return interaction.followUp(`You can only attack this user (or if they perform an action first)!`);