formatting
This commit is contained in:
parent
892fc29a18
commit
3a09c17248
1 changed files with 20 additions and 18 deletions
|
@ -183,7 +183,8 @@ export class Player extends EventEmitter {
|
||||||
const playlist = await spotify.getData(query);
|
const playlist = await spotify.getData(query);
|
||||||
if (!playlist) return void this.emit(PlayerEvents.NO_RESULTS, message, 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 =
|
const sq =
|
||||||
queryType === 'spotify_album'
|
queryType === 'spotify_album'
|
||||||
? `${item.artists[0].name} - ${item.name}`
|
? `${item.artists[0].name} - ${item.name}`
|
||||||
|
@ -197,7 +198,8 @@ export class Player extends EventEmitter {
|
||||||
});
|
});
|
||||||
|
|
||||||
return data[0];
|
return data[0];
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
|
|
||||||
if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
|
if (!tracks.length) return void this.emit(PlayerEvents.NO_RESULTS, message, query);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue