From e9186caf3144f2352d0b573cdbd74e9553cf81ff Mon Sep 17 00:00:00 2001 From: Astoria Floyd Date: Sat, 30 Oct 2021 20:09:52 -0500 Subject: [PATCH] Fixed error on attempting to play a playlist. --- modules/playMusic/main.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/playMusic/main.rb b/modules/playMusic/main.rb index 3e4cae7..f45b3c9 100644 --- a/modules/playMusic/main.rb +++ b/modules/playMusic/main.rb @@ -7,7 +7,9 @@ def playMusic(bot, bang) bot.voice_connect(voice_channel) arguments = message.sub("#{bang}Play ", '').split.first #event.voice.play_file('./example.mp3') - if arguments.include? "youtu" + if arguments.include? "&list" + event.respond "Do not play playlists. They are unsupported." + elsif arguments.include? "youtu" event.respond "Playing song! This may take some time." tempFile = Dir::Tmpname.create(['youtubedlruby-', '.mp3']) {} cmd = "yt-dlp --extract-audio --audio-format mp3 --output " + tempFile + " " + arguments