Untitled
unknown
plain_text
3 years ago
472 B
2
Indexable
Never
const YoutubeMusicApi = require('youtube-music-api'); else if (/^!play\s(.*)/i.test(event.body)) { const data = event.body.match(/^!play\s(.*)/i); const yt = new YoutubeMusicApi() yt.initalize().then(info => { yt.search(data[1], "video").then(result => { let pl = result.content.videoId console.log(result) api.sendMessage("https://music.youtube.com/watch?v=" + pl, event.threadID, event.messageID); }) }) }