|
|
|
@ -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
|
|
|
|
|