forked from ChomeNS/chomens-bot-java
decimal format
This commit is contained in:
parent
cff14ebf9e
commit
bef7412e0b
1 changed files with 5 additions and 2 deletions
|
@ -22,6 +22,7 @@ import net.kyori.adventure.text.format.TextDecoration;
|
|||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class UrbanCommand extends Command {
|
||||
|
@ -78,9 +79,11 @@ public class UrbanCommand extends Command {
|
|||
final String word = definitionObject.get("word").getAsString();
|
||||
final String _definition = definitionObject.get("definition").getAsString();
|
||||
|
||||
final DecimalFormat formatter = new DecimalFormat("#,###");
|
||||
|
||||
final String author = definitionObject.get("author").getAsString();
|
||||
final int thumbsUp = definitionObject.get("thumbs_up").getAsInt();
|
||||
final int thumbsDown = definitionObject.get("thumbs_down").getAsInt();
|
||||
final String thumbsUp = formatter.format(definitionObject.get("thumbs_up").getAsInt());
|
||||
final String thumbsDown = formatter.format(definitionObject.get("thumbs_down").getAsInt());
|
||||
final String example = definitionObject.get("example").getAsString();
|
||||
|
||||
// whats the best way to implement this?
|
||||
|
|
Loading…
Reference in a new issue