Skip to content

Commit

Permalink
Merge pull request #358 from zebz213/add-artist-to-playnow
Browse files Browse the repository at this point in the history
Added artist to playnow
  • Loading branch information
Xenofic authored Oct 23, 2022
2 parents 015e253 + 9522477 commit 5fffac5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/events/Client/playerButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
player.destroy();
return await buttonReply(interaction, `Nothing is playing right now.`, color);
};
const { title, uri, duration, requester } = player.queue.current;
const { title, uri, duration, requester, author } = player.queue.current;

let message;
try {
Expand All @@ -39,7 +39,7 @@ module.exports = {
let icon = player.queue.current.identifier ? `https://img.youtube.com/vi/${player.queue.current.identifier}/maxresdefault.jpg` : client.config.links.img;


let nowplaying = new EmbedBuilder().setColor(color).setDescription(`[${title}](${uri}) • \`[${convertTime(duration)}]\``).setImage(icon).setFooter({ text: `Requested by ${requester.username}`, iconURL: requester.displayAvatarURL({ dynamic: true }) });
let nowplaying = new EmbedBuilder().setColor(color).setDescription(`[${title}](${uri}) by ${author} • \`[${convertTime(duration)}]\``).setImage(icon).setFooter({ text: `Requested by ${requester.username}`, iconURL: requester.displayAvatarURL({ dynamic: true }) });

if (interaction.customId === `pause_but_${interaction.guildId}`) {
if (player.paused) {
Expand Down Expand Up @@ -109,4 +109,3 @@ module.exports = {
};
}
}

2 changes: 1 addition & 1 deletion src/events/Lavalink/trackStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = async (client, player, track, payload) => {
.setDescription(
`${emojiplay} **Started Playing**\n [${track?.title ?? queue.title}](${
track?.uri ?? queue.uri
}) - \`[${convertTime(track?.duration ?? queue.duration)}]\``
}) by ${track.author} - \`[${convertTime(track?.duration ?? queue.duration)}]\``
)
.setThumbnail(
track?.thumbnail ??
Expand Down
6 changes: 3 additions & 3 deletions src/utils/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function neb(embed, player, client) {
return embed
.setDescription(
`[${player.queue.current.title}](${player.queue.current.uri
}) • \`[${convertTime(player.queue.current.duration)}]\``
}) by ${player.queue.current.author} • \`[${convertTime(player.queue.current.duration)}]\``
)
.setImage(icon)
.setFooter({
Expand Down Expand Up @@ -277,7 +277,7 @@ async function trackStartEventHandler(msgId, channel, player, track, client) {
let embed1 = new EmbedBuilder()
.setColor(client.embedColor)
.setDescription(
`[${track.title}](${track.uri}) - \`[${convertTime(
`[${track.title}](${track.uri}) by ${track.author} - \`[${convertTime(
track.duration
)}]\``
)
Expand Down Expand Up @@ -340,7 +340,7 @@ async function trackStartEventHandler(msgId, channel, player, track, client) {
.setColor(message.client.embedColor)
.setDescription(
`${emojiplay} **Started Playing** - [${track.title}](${track.uri
}) - \`[${convertTime(track.duration)}]\``
}) by ${track.author} - \`[${convertTime(track.duration)}]\``
)
.setImage(icon)
.setFooter({
Expand Down

0 comments on commit 5fffac5

Please sign in to comment.