From 0ef608774faf3779b952bd0e54f27f326ad2e243 Mon Sep 17 00:00:00 2001 From: TomasGnG Date: Tue, 26 Sep 2023 22:41:57 +0200 Subject: [PATCH] fixed empty alertlist bug --- .../de/efi23a/bot/features/alert/AlertFeatureListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/de/efi23a/bot/features/alert/AlertFeatureListener.java b/src/main/java/de/efi23a/bot/features/alert/AlertFeatureListener.java index e63141f..cf41834 100644 --- a/src/main/java/de/efi23a/bot/features/alert/AlertFeatureListener.java +++ b/src/main/java/de/efi23a/bot/features/alert/AlertFeatureListener.java @@ -54,6 +54,9 @@ public void onSlashCommandInteraction(SlashCommandInteractionEvent event) { builder.append("-> ").append(alert.get("name")).append(System.lineSeparator()); } + if(builder.isEmpty()) + builder.append("Es wurden keine Erinnerungen gefunden."); + event.reply(builder.toString()).setEphemeral(true).queue(); return; }