diff --git a/src/main/java/base/Bot.java b/src/main/java/base/Bot.java index 2875032..4a86d52 100644 --- a/src/main/java/base/Bot.java +++ b/src/main/java/base/Bot.java @@ -154,7 +154,7 @@ private void readConsole() { try { Writer output = new BufferedWriter(new FileWriter(environment + "/configs/bugs.txt", true)); String[] bug = line.split(" ", 2); - output.append(bug[1]); + output.append(bug[1] + "\n"); output.close(); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Invalid arguments!\nAdd the new bug behind the command!"); diff --git a/src/main/java/commands/moderation/Warning.java b/src/main/java/commands/moderation/Warning.java index 912bcee..f1fa0a6 100644 --- a/src/main/java/commands/moderation/Warning.java +++ b/src/main/java/commands/moderation/Warning.java @@ -25,14 +25,11 @@ public class Warning implements Command{ public void perform(SlashCommandEvent event) { Guild guild = event.getGuild(); User user = event.getUser(); - Bot.INSTANCE.penaltyCheck(guild); if (Configloader.INSTANCE.getGuildConfig(guild, "modrole").equals("")) { event.replyEmbeds(AnswerEngine.ae.fetchMessage(guild, user, "/commands/moderation/warning:nomodrole")).queue(); - return; } if (!event.getMember().getRoles().contains(guild.getRoleById(Configloader.INSTANCE.getGuildConfig(guild, "modrole")))) { event.replyEmbeds(AnswerEngine.ae.fetchMessage(guild, user,"/commands/moderation/warning:nopermission")).queue(); - return; } if (event.getSubcommandName().equals("add")) { final User iuser = event.getOption("user").getAsUser(); @@ -51,7 +48,6 @@ public void perform(SlashCommandEvent event) { AnswerEngine.ae.getDescription(guild, iuser, "/commands/moderation/warning:pm").replace("{guild}", guild.getName()).replace("{reason}", reason))).queue(); }); } catch (Exception e) {} - return; } if (event.getSubcommandName().equals("list")) { this.listwarnings(event); @@ -76,6 +72,7 @@ public void perform(SlashCommandEvent event) { () -> {channel.sendMessageEmbeds(AnswerEngine.ae.fetchMessage(guild, user,"/commands/moderation/warning:timeout")).queue(response -> response.delete().queueAfter(3, TimeUnit.SECONDS));}); } } + Bot.INSTANCE.penaltyCheck(guild); } @Override