This commit is contained in:
GregTCLTK 2020-01-23 08:40:40 +01:00
parent a9f5aa9f05
commit e9a1aee13b
No known key found for this signature in database
GPG key ID: A91BADE5C070FF67

View file

@ -56,13 +56,15 @@ public class RulesCommand implements Command {
try { try {
TextChannel channel = e1.getGuild().getTextChannelsByName(e1.getMessage().getContentRaw(), true).get(0); TextChannel channel = e1.getGuild().getTextChannelsByName(e1.getMessage().getContentRaw(), true).get(0);
createRules(e, e1, channel); createRules(e, e1, channel);
} catch (Exception ex) { } catch (NullPointerException ex) {
e.getTextChannel().sendMessage( e.getTextChannel().sendMessage(
e.getMessageEditor().getMessage( e.getMessageEditor().getMessage(
MessageEditor.MessageType.ERROR, MessageEditor.MessageType.ERROR,
"commands.moderation.rules.channel.error.title", "commands.moderation.rules.channel.error.title",
"commands.moderation.rules.channel.error.description") "commands.moderation.rules.channel.error.description")
.build()).queue(); .build()).queue();
} catch (Exception ex) {
ex.printStackTrace();
} }
} }
}, e.getJDA(), e.getAuthor()); }, e.getJDA(), e.getAuthor());