mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 14:38:49 +00:00
fix: Indicate looping mode in skipping messages if enabled
This commit is contained in:
1 parent
3b147bd0b0
commit
434bc6730f
2 files changed
+33
-2
No files matched your search
+14
-1
@@ -219,6 +219,10 @@ module.exports = {
|
||||
: `\`${skippedTrack.duration}\``;
|
||||
queue.node.skip();
|
||||
|
||||
const repeatModeUserString = loopModesFormatted.get(
|
||||
queue.repeatMode
|
||||
);
|
||||
|
||||
return await interaction.followUp({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
@@ -229,7 +233,16 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.skipped} Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**`
|
||||
`**${embedIcons.skipped} Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**` +
|
||||
`${
|
||||
queue.repeatMode === 0
|
||||
? ''
|
||||
: `\n\n**${
|
||||
queue.repeatMode === 3
|
||||
? embedIcons.autoplaying
|
||||
: embedIcons.looping
|
||||
} Looping**\nLoop mode is set to ${repeatModeUserString}. You can change it with \`/loop\`.`
|
||||
}`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
|
||||
+19
-1
@@ -101,6 +101,15 @@ module.exports = {
|
||||
: `\`${skippedTrack.duration}\``;
|
||||
queue.node.skip();
|
||||
|
||||
const loopModesFormatted = new Map([
|
||||
[0, 'disabled'],
|
||||
[1, 'track'],
|
||||
[2, 'queue'],
|
||||
[3, 'autoplay']
|
||||
]);
|
||||
|
||||
const loopModeUserString = loopModesFormatted.get(queue.repeatMode);
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
@@ -111,7 +120,16 @@ module.exports = {
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.skipped} Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**`
|
||||
`**${embedIcons.skipped} Skipped track**\n${durationFormat} **[${skippedTrack.title}](${skippedTrack.url})**` +
|
||||
`${
|
||||
queue.repeatMode === 0
|
||||
? ''
|
||||
: `\n\n**${
|
||||
queue.repeatMode === 3
|
||||
? embedIcons.autoplaying
|
||||
: embedIcons.looping
|
||||
} Looping**\nLoop mode is set to ${loopModeUserString}. You can change it with \`/loop\`.`
|
||||
}`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
|
||||
Reference in new issue
Block a user