Skip to content

Commit

Permalink
Fixed music part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince527GitHub committed Mar 10, 2024
1 parent 20c830a commit be5fb22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SlashCommands/music/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = {
]
});

} else if (loadType === "track") {
} else if (loadType === "search" || loadType === "track") {

const track = tracks.shift();
track.info.requester = interaction.member;
Expand All @@ -84,7 +84,7 @@ module.exports = {
embeds: [
new EmbedBuilder()
.setDescription(`✅ **|** **[${track.info.title}](${track.info.uri})** has been added to the queue`)
.setThumbnail(`${track.info.image ? track.info.image : 'https://api.serversmp.xyz/upload/1/prince/hXLEkmnukU.png'}`)
.setThumbnail(`${track.info.artworkUrl || 'https://api.serversmp.xyz/upload/1/prince/hXLEkmnukU.png'}`)
.setColor("Blue")
]
});
Expand Down
4 changes: 2 additions & 2 deletions website/router/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ router.post("/music/play", checkAPIAuth, async (req, res) => {
length: tracks.length,
title: playlistInfo.name
};
} else if (loadType === "track") {
} else if (loadType === "search" || loadType === "track") {
const track = tracks.shift();
track.info.requester = member;
player.queue.add(track);

api.track = {
title: track.info.title,
url: track.info.uri,
image: track.info.image
image: track.info.artworkUrl
};
} else return res.json({ error: "Failed to find your song" });

Expand Down

0 comments on commit be5fb22

Please sign in to comment.