mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 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}\``;
|
: `\`${skippedTrack.duration}\``;
|
||||||
queue.node.skip();
|
queue.node.skip();
|
||||||
|
|
||||||
|
const repeatModeUserString = loopModesFormatted.get(
|
||||||
|
queue.repeatMode
|
||||||
|
);
|
||||||
|
|
||||||
return await interaction.followUp({
|
return await interaction.followUp({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
@@ -229,7 +233,16 @@ module.exports = {
|
|||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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)
|
.setThumbnail(skippedTrack.thumbnail)
|
||||||
.setColor(embedColors.colorSuccess)
|
.setColor(embedColors.colorSuccess)
|
||||||
|
|||||||
+19
-1
@@ -101,6 +101,15 @@ module.exports = {
|
|||||||
: `\`${skippedTrack.duration}\``;
|
: `\`${skippedTrack.duration}\``;
|
||||||
queue.node.skip();
|
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({
|
return await interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
@@ -111,7 +120,16 @@ module.exports = {
|
|||||||
iconURL: interaction.user.avatarURL()
|
iconURL: interaction.user.avatarURL()
|
||||||
})
|
})
|
||||||
.setDescription(
|
.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)
|
.setThumbnail(skippedTrack.thumbnail)
|
||||||
.setColor(embedColors.colorSuccess)
|
.setColor(embedColors.colorSuccess)
|
||||||
|
|||||||
Reference in new issue
Block a user