fix fractional items and qbucks

This commit is contained in:
2025-09-14 21:16:30 +02:00
parent 4048e1b3c3
commit ebdf6264d4
5 changed files with 7 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ export default new Command({
if (!target) { await sendMessage(`Chatter ${args[0]} doesn't exist`, msg.messageId); return; };
const userRecord = await getUserRecord(target);
if (!args[1]) { await sendMessage('Please specify the amount qweribucks you want to give', msg.messageId); return; };
const amount = Number(args[1]);
const amount = parseInt(args[1]);
if (isNaN(amount)) { await sendMessage(`${args[1]} is not a valid amount`); return; };
if (await target.itemLock()) { await sendMessage('Cannot give qweribucks: item lock is set', msg.messageId); return; };
await target.setLock();