[DayliMadame] Check permission before sending message to prevent crash
This commit is contained in:
parent
2473d0d0a4
commit
1389a11e46
@ -65,7 +65,7 @@ public class DailyMadame implements NewDayListener{
|
|||||||
if(guildPreferenceRepository.findByGuildId(guild.getId()).get(0).isDailyMadame()){
|
if(guildPreferenceRepository.findByGuildId(guild.getId()).get(0).isDailyMadame()){
|
||||||
for(TextChannel iterator : guild.getTextChannels())
|
for(TextChannel iterator : guild.getTextChannels())
|
||||||
{
|
{
|
||||||
if(iterator.isNSFW()){
|
if(iterator.isNSFW() && iterator.canTalk()){
|
||||||
chanel = iterator;
|
chanel = iterator;
|
||||||
logger.debug("break: " + chanel.getName());
|
logger.debug("break: " + chanel.getName());
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user