Skip to content

Commit

Permalink
Allow use of spaces and lowercase in setsponsorblock command
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdbeerbaerLP committed Jun 10, 2024
1 parent e9ca8d5 commit 726ab9a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void execute(CommandEvent event) {
event.reply(event.getClient().getSuccess() + " Sponsorblock has now been disabled!");
} else {
final ArrayList<de.erdbeerbaerlp.jsponsorblock.Category> 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) {
Expand Down

0 comments on commit 726ab9a

Please sign in to comment.