Browse Source

report hype v7

master
gsd 10 months ago
parent
commit
96eb4b9c73
  1. 16
      src/main/java/app/services/db/ReportService.java

16
src/main/java/app/services/db/ReportService.java

@ -73,8 +73,8 @@ public class ReportService {
reported_player==null?null:reported_player.getDeads(),
reported_player==null?null:reported_player.getDuration_seconds(),
text, Instant.now().getEpochSecond(), reported_user.getPlay_on().getServer_id(),
stats.getServers().get(reported_user.getPlay_on().getServer_id()).getPlayer_count(),
text, Instant.now().getEpochSecond(), reported_user==null?current_user.getPlay_on().getServer_id():reported_user.getPlay_on().getServer_id(),
stats.getServers().get(reported_user==null?current_user.getPlay_on().getServer_id():reported_user.getPlay_on().getServer_id()).getPlayer_count(),
reportType.ordinal());
}
@ -152,17 +152,17 @@ public class ReportService {
HashMap<String, Object> embed = new HashMap<>();
embed.put("author", Map.of("name", author, "url", current_user.getSteamids().community_url));
if (reported_user != null)
if (reported_user != null) {
embed.put("title", reported);
embed.put("url", reported_user.getSteamids().community_url);
embed.put("url", reported_user.getSteamids().community_url);
}
embed.put("description", text);
embed.put("color", 16581375); // 255 * 255 * 255 | black
embed.put("footer", Map.of(
"text", "%s • %d/%d ".formatted(
stats.getServers().get(reported_user.getPlay_on().getServer_id()).getName(),
stats.getServers().get(reported_user.getPlay_on().getServer_id()).getPlayer_count(),
stats.getServers().get(reported_user.getPlay_on().getServer_id()).getMax_players()),
stats.getServers().get(reported_user==null?current_user.getPlay_on().getServer_id():reported_user.getPlay_on().getServer_id()).getName(),
stats.getServers().get(reported_user==null?current_user.getPlay_on().getServer_id():reported_user.getPlay_on().getServer_id()).getPlayer_count(),
stats.getServers().get(reported_user==null?current_user.getPlay_on().getServer_id():reported_user.getPlay_on().getServer_id()).getMax_players()),
"icon_url", tf2_icon
));
embed.put("timestamp", Instant.now().toString());

Loading…
Cancel
Save