Improved auctions

- Added Starting Bid (only for first bid)
- Fixed missing $'s in messages
- Improved the way numbers are displayed in auctions for readability
- Added AuctionActions to store bids by users
- Removed as much code that was relying on text being in embeds as possible
- Improved structure of code related to auctions
This commit is contained in:
2022-10-30 02:05:16 +01:00
parent 5d8368d0e5
commit 723847a3be
12 changed files with 323 additions and 193 deletions
+12
View File
@@ -216,4 +216,16 @@ public class Util {
return str.toUpperCase();
return str.toUpperCase().charAt(0) + str.toLowerCase().substring(1);
}
public static String formatNumber(int price) {
String priceString = new StringBuilder(String.valueOf(price)).reverse().toString();
StringBuilder sb = new StringBuilder();
int i = 0;
while (i + 3 < priceString.length()) {
sb.append(priceString, i, i + 3).append(",");
i += 3;
}
sb.append(priceString.substring(i)).reverse();
return "" + sb;
}
}