Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
ytdlDiscord.getBasicInfo(searchString, {}, (err, info) => {
if (err) {
return reject(err);
}
const song = new Song();
song.title = info.title;
song.url = info.video_url;
song.artist = info.author.name;
song.src = Song.srcType.YT;
return resolve([song]);
});
});
}