From ca271067f90c365926f475ad819e3c7e1cfe8299 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sun, 20 Aug 2023 09:50:22 +0700 Subject: [PATCH] fix the thing --- .../chipmunk/chayapak/chomens_bot/commands/MusicCommand.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/MusicCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/MusicCommand.java index f6d02df..43d2ba5 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/MusicCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/MusicCommand.java @@ -91,6 +91,9 @@ public class MusicCommand extends Command { Path path; try { _path = String.join(" ", Arrays.copyOfRange(args, 1, args.length)); + + if (_path.isBlank()) return Component.text("No song specified").color(NamedTextColor.RED); + path = Path.of(root.toString(), _path); if (path.toString().contains("http")) player.loadSong(new URL(_path));