Skip to content

Commit

Permalink
Fixed discord details not showing boolean fields correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Alf-Melmac committed May 14, 2021
1 parent 094e3ac commit 0feb577
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/de/webalf/slotbot/util/EventUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ private static void addFields(@NonNull EmbedBuilder embedBuilder, @NonNull Event
addField("Reserve nimmt teil", buildReserveParticipatingField(event.getReserveParticipating()), true, embedBuilder);
event.getDetails().forEach(field -> {
String text = field.getText();
if ("true".equals(text)) {
text = "Ja";
} else if ("false".equals(text)) {
text = "Nein";
}
if (StringUtils.isNotEmpty(field.getLink())) {
text = "[" + text + "](" + fixUrl(field.getLink()) + ")";
}
Expand Down

0 comments on commit 0feb577

Please sign in to comment.