mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 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;
|
||||
}
|
||||
|
||||
protected getDisplayRepeatMode(repeatMode: number): string {
|
||||
protected getDisplayRepeatMode(repeatMode: number, state: string = 'info'): string {
|
||||
let loopModeUserString: string;
|
||||
let icon: string;
|
||||
|
||||
switch (repeatMode) {
|
||||
case 1:
|
||||
loopModeUserString = 'track';
|
||||
icon = this.embedOptions.icons.loop;
|
||||
icon = state === 'info' ? this.embedOptions.icons.loop : this.embedOptions.icons.looping;
|
||||
break;
|
||||
case 2:
|
||||
loopModeUserString = 'queue';
|
||||
icon = this.embedOptions.icons.loop;
|
||||
icon = state === 'info' ? this.embedOptions.icons.loop : this.embedOptions.icons.looping;
|
||||
break;
|
||||
case 3:
|
||||
loopModeUserString = 'autoplay';
|
||||
icon = this.embedOptions.icons.autoplay;
|
||||
icon = state === 'info' ? this.embedOptions.icons.autoplay : this.embedOptions.icons.autoplaying;
|
||||
break;
|
||||
default:
|
||||
return '';
|
||||
|
||||
@@ -71,7 +71,7 @@ class NowplayingSkipButton extends BaseComponentInteraction {
|
||||
.setDescription(
|
||||
`**${this.embedOptions.icons.skipped} Skipped track**\n` +
|
||||
`${this.getDisplayTrackDurationAndUrl(skippedTrack)}\n\n` +
|
||||
`${this.getDisplayRepeatMode(queue.repeatMode)}`
|
||||
`${this.getDisplayRepeatMode(queue.repeatMode, 'success')}`
|
||||
)
|
||||
.setThumbnail(skippedTrack.thumbnail)
|
||||
.setColor(this.embedOptions.colors.success);
|
||||
|
||||
Reference in new issue
Block a user