Skip to content

Commit baf629a

Browse files
committed
Merge branch 'master' of https://github.com/jagrosh/MusicBot
2 parents c4e11d6 + 041ab27 commit baf629a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/jagrosh/jmusicbot/commands/owner/PlaylistCmd.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ public MakelistCmd()
7272
protected void execute(CommandEvent event)
7373
{
7474
String pname = event.getArgs().replaceAll("\\s+", "_");
75-
if(bot.getPlaylistLoader().getPlaylist(pname)==null)
75+
if(pname == null || pname.isEmpty())
76+
{
77+
event.replyError("Please provide a name for the playlist!");
78+
}
79+
else if(bot.getPlaylistLoader().getPlaylist(pname) == null)
7680
{
7781
try
7882
{

0 commit comments

Comments
 (0)