weapon inv stealing fix

This commit is contained in:
Jill 2023-11-22 15:05:18 +03:00
parent 7a4b9e1726
commit 3d5a7b041d
1 changed files with 2 additions and 0 deletions

View File

@ -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 <t:${Math.floor((Date.now() + invinTimer) / 1000)}:R> (or if they perform an action first)!`);