From e49cfa94959c6478f4cc8357200e74c86bf80734 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 21 May 2026 13:19:27 +0200 Subject: [PATCH] Fix duplicates in CouncilChannel --- .../steamwar/velocitycore/discord/channels/CouncilChannel.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/CouncilChannel.java b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/CouncilChannel.java index ac563005..81530918 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/CouncilChannel.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/CouncilChannel.java @@ -95,6 +95,7 @@ public class CouncilChannel extends StaticMessageChannel { super(threadChannel, () -> { MessageCreateBuilder messageCreateBuilder = new MessageCreateBuilder(); messageCreateBuilder.setContent("# Ratsmitglieder"); + Set uniqueNames = new HashSet<>(); membersByRole.get(role) .stream() .map(member -> { @@ -105,6 +106,7 @@ public class CouncilChannel extends StaticMessageChannel { }) .sorted(Map.Entry.comparingByKey()) .forEach(entry -> { + if (!uniqueNames.add(entry.getKey())) return; messageCreateBuilder.addEmbeds(new EmbedBuilder() .setTitle(entry.getKey()) .setImage(entry.getValue() == null ? null : "https://api.steamwar.de/data/skin/" + entry.getValue())