AI3
This commit is contained in:
parent
ef94c8823b
commit
9d65de821e
@ -588,8 +588,9 @@ body {
|
||||
font-family: "Cinzel", serif;
|
||||
font-size: 15px;
|
||||
color: #2b1b0f;
|
||||
line-height: 1.6;
|
||||
line-height: 1.8;
|
||||
text-align: center;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.notification-footer {
|
||||
|
||||
@ -147,7 +147,15 @@ document.addEventListener("click", async (e) => {
|
||||
const data = await res.json();
|
||||
|
||||
if (data.error) {
|
||||
showNotification(data.error, "Nicht genug Gold", "🪙");
|
||||
if (data.missing) {
|
||||
showNotification(
|
||||
`Du hast ${data.gold} 🪙 Gold.\nDu brauchst ${data.price} 🪙 Gold.\nEs fehlen dir noch ${data.missing} 🪙 Gold.`,
|
||||
"Nicht genug Gold",
|
||||
"🪙",
|
||||
);
|
||||
} else {
|
||||
showNotification(data.error, "Hinweis", "⚠️");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +82,13 @@ WHERE account_id = ?
|
||||
);
|
||||
|
||||
if (currency.gold < price) {
|
||||
return res.json({ error: "Nicht genug Gold" });
|
||||
const missing = price - currency.gold;
|
||||
return res.json({
|
||||
error: "Nicht genug Gold",
|
||||
gold: currency.gold,
|
||||
price: price,
|
||||
missing: missing,
|
||||
});
|
||||
}
|
||||
|
||||
await db.query(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user