forked from Fascinated/Bat
update number formatter
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package cc.fascinated.bat.service;
|
||||
|
||||
import cc.fascinated.bat.common.NumberFormatter;
|
||||
import cc.fascinated.bat.common.TimerUtils;
|
||||
import lombok.Getter;
|
||||
import net.dv8tion.jda.api.JDA;
|
||||
@ -26,10 +27,9 @@ public class DiscordService {
|
||||
public static JDA JDA;
|
||||
|
||||
private final List<String> messages = List.of(
|
||||
"over {guilds} guilds",
|
||||
"over {users} users",
|
||||
"over ScoreSaber scores",
|
||||
"your messages",
|
||||
"{guilds} guilds",
|
||||
"{users} users",
|
||||
"your ScoreSaber scores",
|
||||
"/help for help"
|
||||
);
|
||||
|
||||
@ -60,8 +60,8 @@ public class DiscordService {
|
||||
public void updateActivity() {
|
||||
int guildCount = JDA.getGuilds().size();
|
||||
JDA.getPresence().setActivity(Activity.watching(messages.get(guildCount % messages.size())
|
||||
.replace("{guilds}", String.valueOf(guildCount))
|
||||
.replace("{users}", String.valueOf(JDA.getUsers().size()))
|
||||
.replace("{guilds}", NumberFormatter.format(guildCount))
|
||||
.replace("{users}", NumberFormatter.format(JDA.getUsers().size()))
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user