From 726ab9a3230a4a6f4eec0f14a347d1965228ec03 Mon Sep 17 00:00:00 2001 From: ErdbeerbaerLP Date: Mon, 10 Jun 2024 16:04:34 +0200 Subject: [PATCH] Allow use of spaces and lowercase in `setsponsorblock` command --- .../jagrosh/jmusicbot/commands/admin/SetsponsorblockCmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/jagrosh/jmusicbot/commands/admin/SetsponsorblockCmd.java b/src/main/java/com/jagrosh/jmusicbot/commands/admin/SetsponsorblockCmd.java index 18e147e0d..1586ef82c 100644 --- a/src/main/java/com/jagrosh/jmusicbot/commands/admin/SetsponsorblockCmd.java +++ b/src/main/java/com/jagrosh/jmusicbot/commands/admin/SetsponsorblockCmd.java @@ -46,7 +46,7 @@ protected void execute(CommandEvent event) { event.reply(event.getClient().getSuccess() + " Sponsorblock has now been disabled!"); } else { final ArrayList cats = new ArrayList<>(); - for (String str : event.getArgs().split(",")) { + for (String str : event.getArgs().replace(" ", "").toUpperCase().split(",")) { try { cats.add(de.erdbeerbaerlp.jsponsorblock.Category.valueOf(str)); } catch (IllegalArgumentException e) {