mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: update getDisplayRepeatMode showing wrong icon on success
This commit is contained in:
1 parent
cf45bde80b
commit
ea8cf100f5
2 files changed
+5
-5
No files matched your search
@@ -152,22 +152,22 @@ abstract class BaseInteraction {
|
|||||||
return progressBar;
|
return progressBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getDisplayRepeatMode(repeatMode: number): string {
|
protected getDisplayRepeatMode(repeatMode: number, state: string = 'info'): string {
|
||||||
let loopModeUserString: string;
|
let loopModeUserString: string;
|
||||||
let icon: string;
|
let icon: string;
|
||||||
|
|
||||||
switch (repeatMode) {
|
switch (repeatMode) {
|
||||||
case 1:
|
case 1:
|
||||||
loopModeUserString = 'track';
|
loopModeUserString = 'track';
|
||||||
icon = this.embedOptions.icons.loop;
|
icon = state === 'info' ? this.embedOptions.icons.loop : this.embedOptions.icons.looping;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
loopModeUserString = 'queue';
|
loopModeUserString = 'queue';
|
||||||
icon = this.embedOptions.icons.loop;
|
icon = state === 'info' ? this.embedOptions.icons.loop : this.embedOptions.icons.looping;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
loopModeUserString = 'autoplay';
|
loopModeUserString = 'autoplay';
|
||||||
icon = this.embedOptions.icons.autoplay;
|
icon = state === 'info' ? this.embedOptions.icons.autoplay : this.embedOptions.icons.autoplaying;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class NowplayingSkipButton extends BaseComponentInteraction {
|
|||||||
.setDescription(
|
.setDescription(
|
||||||
`**${this.embedOptions.icons.skipped} Skipped track**\n` +
|
`**${this.embedOptions.icons.skipped} Skipped track**\n` +
|
||||||
`${this.getDisplayTrackDurationAndUrl(skippedTrack)}\n\n` +
|
`${this.getDisplayTrackDurationAndUrl(skippedTrack)}\n\n` +
|
||||||
`${this.getDisplayRepeatMode(queue.repeatMode)}`
|
`${this.getDisplayRepeatMode(queue.repeatMode, 'success')}`
|
||||||
)
|
)
|
||||||
.setThumbnail(skippedTrack.thumbnail)
|
.setThumbnail(skippedTrack.thumbnail)
|
||||||
.setColor(this.embedOptions.colors.success);
|
.setColor(this.embedOptions.colors.success);
|
||||||
|
|||||||
Reference in new issue
Block a user