* Fixes #514 Require inputing name for `playlist make <name>` command playlist make command without a name will now not make an empty playlist without a playlist name. * Update src/main/java/com/jagrosh/jmusicbot/commands/owner/PlaylistCmd.java Co-authored-by: Michaili K <mysteriouscursor+git@protonmail.com> * Rid excessive hints Co-authored-by: Michaili K <mysteriouscursor+git@protonmail.com>
This commit is contained in:
@@ -72,7 +72,11 @@ public class PlaylistCmd extends OwnerCommand
|
|||||||
protected void execute(CommandEvent event)
|
protected void execute(CommandEvent event)
|
||||||
{
|
{
|
||||||
String pname = event.getArgs().replaceAll("\\s+", "_");
|
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
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user