From ab80172d2d46a369987efe111f062782ab11cb98 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Thu, 10 Dec 2020 20:07:02 +0100 Subject: [PATCH] Removed error message when an error occurs while checking the timetable --- .../untisbot/discord/DiscordCommandListener.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/org/bytedream/untisbot/discord/DiscordCommandListener.java b/src/org/bytedream/untisbot/discord/DiscordCommandListener.java index fec1884..8fbc418 100755 --- a/src/org/bytedream/untisbot/discord/DiscordCommandListener.java +++ b/src/org/bytedream/untisbot/discord/DiscordCommandListener.java @@ -530,7 +530,6 @@ public class DiscordCommandListener extends ListenerAdapter { } boolean changes = false; - boolean error = false; Data.Stats stats = statsDataConnector.get(guildId); String setLanguage = data.getLanguage(); if (setLanguage == null) { @@ -678,20 +677,11 @@ public class DiscordCommandListener extends ListenerAdapter { } } stats = statsDataConnector.get(guildId); - - if (error) { - error = false; - } } else if (lastChecked == null || lastChecked.isBefore(now.plusDays(i))) { guildDataConnector.update(guildId, null, null, null, null, null, null, null, null, null, null, now.plusDays(i)); } } catch (Exception e) { logger.warn(guildId + " ran into an exception while trying to check the timetable for the " + localDate.format(DateTimeFormatter.ofPattern("dd.MM.yyyy")), e); - if (!error) { - textChannel.sendMessage("An error occurred while trying to check the timetable. " + - "You can try to re-set your data or trying to contact my author <@650417934073593886> (:3) if the problem won't go away").queue(); - error = true; - } try { Thread.sleep((i + 1) * 5000); } catch (InterruptedException ignore) {