redo spotify track
This commit is contained in:
parent
37f8dc67f8
commit
aeb863e756
1 changed files with 3 additions and 3 deletions
|
@ -185,11 +185,11 @@ export class Player extends EventEmitter {
|
||||||
/https?:\/\/(?:embed\.|open\.)(?:spotify\.com\/)(?:track\/|\?uri=spotify:track:)((\w|-){22})/
|
/https?:\/\/(?:embed\.|open\.)(?:spotify\.com\/)(?:track\/|\?uri=spotify:track:)((\w|-){22})/
|
||||||
);
|
);
|
||||||
if (matchSpotifyURL) {
|
if (matchSpotifyURL) {
|
||||||
const spotifyData = await spotify.getPreview(query).catch(() => {});
|
const spotifyData = await spotify.getData(query).catch(() => {});
|
||||||
if (spotifyData) {
|
if (spotifyData) {
|
||||||
const searchString = this.options.disableArtistSearch
|
const searchString = this.options.disableArtistSearch
|
||||||
? spotifyData.title
|
? spotifyData.name
|
||||||
: `${spotifyData.artist} - ${spotifyData.title}`;
|
: `${spotifyData.name}${spotifyData.artists[0] ? ` - ${spotifyData.artists[0]?.name}` : ""}`;
|
||||||
tracks = await Util.ytSearch(searchString, {
|
tracks = await Util.ytSearch(searchString, {
|
||||||
user: message.author,
|
user: message.author,
|
||||||
player: this,
|
player: this,
|
||||||
|
|
Loading…
Reference in a new issue