forgot to add itemlock verification to give commands

This commit is contained in:
2025-06-27 12:34:54 +02:00
parent fa7c45042d
commit 61ba81d850
2 changed files with 2 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ export default new Command('give', ['give'], [], async (msg, user) => {
const userRecord = await getUserRecord(user);
if (userRecord.inventory[item.name]! < amount) { await sendMessage(`You can't give items you don't have!`, msg.messageId); return; };
if (await user.itemLock() || await target.itemLock()) { await sendMessage('Cannot give item. Please try again!', msg.messageId); return; };
await user.setLock();
await target.setLock();
const data = await Promise.all([