Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jagrosh/MusicBot
Browse files Browse the repository at this point in the history
  • Loading branch information
jagrosh committed Apr 6, 2022
2 parents c4e11d6 + 041ab27 commit baf629a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ public MakelistCmd()
protected void execute(CommandEvent event)
{
String pname = event.getArgs().replaceAll("\\s+", "_");
if(bot.getPlaylistLoader().getPlaylist(pname)==null)
if(pname == null || pname.isEmpty())
{
event.replyError("Please provide a name for the playlist!");
}
else if(bot.getPlaylistLoader().getPlaylist(pname) == null)
{
try
{
Expand Down

0 comments on commit baf629a

Please sign in to comment.