Skip to content

Commit

Permalink
[New] Added progressbar to nowplaying command
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Nov 25, 2021
1 parent a8a3f7b commit 2c52592
Showing 1 changed file with 41 additions and 16 deletions.
57 changes: 41 additions & 16 deletions commands/Music/nowPlaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,28 @@ module.exports = {
],
});
}
const trackProgress = queue.createProgressBar({
timecodes: true,
length: 8,
});

return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
`🎵 | **${queue.nowPlaying()}** in [<#${
message.member.voice.channelId
}>]`
),
const embed = {
description: `🎵 | **${queue.nowPlaying()}**`,
thumbnail: {
url: `${queue.current.thumbnail}`,
},
fields: [
{
name: "\u200b",
value: trackProgress.replace(/ 0:00/g, " ◉ LIVE"),
},
],
color: "#9dcc37",
timestamp: new Date(),
};

return await message.channel.send({
embeds: [embed],
});
},
data: new SlashCommandBuilder()
Expand All @@ -51,15 +63,28 @@ module.exports = {
});
}

await interaction.followUp({
embeds: [
embedMessage(
"#9dcc37",
`🎵 | **${queue.nowPlaying()}** in [<#${
interaction.member.voice.channelId
}>]`
),
const trackProgress = queue.createProgressBar({
timecodes: true,
length: 8,
});

const embed = {
description: `🎵 | **${queue.nowPlaying()}**`,
thumbnail: {
url: `${queue.current.thumbnail}`,
},
fields: [
{
name: "\u200b",
value: trackProgress.replace(/ 0:00/g, " ◉ LIVE"),
},
],
color: "#9dcc37",
timestamp: new Date(),
};

return await interaction.followUp({
embeds: [embed],
});
},
};

0 comments on commit 2c52592

Please sign in to comment.