formatting

This commit is contained in:
Snowflake107 2021-05-09 18:09:20 +05:45
parent 892fc29a18
commit 3a09c17248

View file

@ -183,7 +183,8 @@ export class Player extends EventEmitter {
const playlist = await spotify.getData(query);
if (!playlist) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
const tracks = await Promise.all<Track>(playlist.tracks.items.map(async (item: any) => {
const tracks = await Promise.all<Track>(
playlist.tracks.items.map(async (item: any) => {
const sq =
queryType === 'spotify_album'
? `${item.artists[0].name} - ${item.name}`
@ -197,7 +198,8 @@ export class Player extends EventEmitter {
});
return data[0];
}));
})
);
if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query);