From 1389a11e46f4c5f8e4714b19ac9ea987391c79d3 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Fri, 27 Sep 2019 09:17:12 +0200 Subject: [PATCH] [DayliMadame] Check permission before sending message to prevent crash --- .../net/Broken/Tools/DayListener/Listeners/DailyMadame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Broken/Tools/DayListener/Listeners/DailyMadame.java b/src/main/java/net/Broken/Tools/DayListener/Listeners/DailyMadame.java index 6c6b467..81ac670 100644 --- a/src/main/java/net/Broken/Tools/DayListener/Listeners/DailyMadame.java +++ b/src/main/java/net/Broken/Tools/DayListener/Listeners/DailyMadame.java @@ -65,7 +65,7 @@ public class DailyMadame implements NewDayListener{ if(guildPreferenceRepository.findByGuildId(guild.getId()).get(0).isDailyMadame()){ for(TextChannel iterator : guild.getTextChannels()) { - if(iterator.isNSFW()){ + if(iterator.isNSFW() && iterator.canTalk()){ chanel = iterator; logger.debug("break: " + chanel.getName()); break;