This repository has been archived on 2026-01-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Lunaris/music_sources/spotify.js
2023-06-28 03:04:01 +02:00

14 lines
331 B
JavaScript

const playdl = require('play-dl');
// TODO ADD SPOTIFY SUPPORT
async function getStream(query) {
const trackInfo = await playdl.spotify(query);
const searched = await play.search(`${trackInfo.name}`, {
limit: 1,
});
const stream = await play.stream(searched[0].url);
return stream;
}
module.exports.getStream = getStream;