From e9a1aee13b5a26c439186bb8903c43c0b82def4b Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Thu, 23 Jan 2020 08:40:40 +0100 Subject: [PATCH] Changes --- .../java/com/bbn/hadder/commands/moderation/RulesCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java index 00f81ac..48d54d2 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java @@ -56,13 +56,15 @@ public class RulesCommand implements Command { try { TextChannel channel = e1.getGuild().getTextChannelsByName(e1.getMessage().getContentRaw(), true).get(0); createRules(e, e1, channel); - } catch (Exception ex) { + } catch (NullPointerException ex) { e.getTextChannel().sendMessage( e.getMessageEditor().getMessage( MessageEditor.MessageType.ERROR, "commands.moderation.rules.channel.error.title", "commands.moderation.rules.channel.error.description") .build()).queue(); + } catch (Exception ex) { + ex.printStackTrace(); } } }, e.getJDA(), e.getAuthor());