Add embeds footer text to custom translations. #3
1 arquivos alterados com 1 adições e 9 exclusões
Remove CPU status query
commit
c334b2611f
|
|
@ -32,15 +32,7 @@ public class StatusCommand extends DeveloperCommand {
|
|||
embedBuilder.setAuthor(jda.getSelfUser().getName(), "https://discord.com", jda.getSelfUser().getAvatarUrl());
|
||||
embedBuilder.setTitle("Status Log");
|
||||
|
||||
long[] processorsLoad;
|
||||
try {
|
||||
processorsLoad = Arrays.stream(new SystemInfo().getHardware().getProcessors()).map(Processor::getLoad).mapToLong(v -> v.longValue() * 100L).toArray();
|
||||
} catch (UnsupportedOperationException exception) {
|
||||
processorsLoad = new long[]{-1};
|
||||
}
|
||||
String output1 = "" +
|
||||
"\n" + "**CPU: **" + (processorsLoad[0] != -1L ? MathHelper.average(processorsLoad) + "%" : "Unknown") +
|
||||
"\n" + "**RAM: **" + (runtime.totalMemory() - runtime.freeMemory()) / 1024L / 1024L + "MB / " + runtime.totalMemory() / 1024L / 1024L + "MB" + String.format(" (%s%% free)", Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory());
|
||||
String output1 = "**RAM: **" + (runtime.totalMemory() - runtime.freeMemory()) / 1024L / 1024L + "MB / " + runtime.totalMemory() / 1024L / 1024L + "MB" + String.format(" (%s%% free)", Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory());
|
||||
|
||||
embedBuilder.setDescription(output1);
|
||||
|
||||
|
|
|
|||
Referência em uma nova issue