This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot/plugins/youtube_dl.lua
2015-06-06 22:15:31 +02:00

15 lines
553 B
Lua

function run(msg, matches)
URL = matches[1]
local receiver = get_receiver(msg)
text = run_bash("rm tmp/video.mp4 && youtube-dl -o tmp/video.mp4 " .. URL)
send_video(get_receiver(msg), "tmp/video.mp4", ok_cb, false)
return 'Video wird gesendet! \nDas kann je nach Video bis zu 10 Minuten dauern!'
end
return {
description = "Downloadet und sendet ein Video von verschiedenen Seiten mit youtube-dl",
usage = {"/dl [Link]"},
patterns = {"^/dl (https?://[%w-_%.%?%.:/%+=&]+)$"},
run = run
}
--by Akamaru [https://ponywave.de]