mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
fix: refactored nowplaying skip button component + more common methods
This commit is contained in:
1 parent
a9ce285650
commit
78e8f12c99
5 files changed
+78
-93
No files matched your search
@@ -152,6 +152,26 @@ abstract class BaseInteraction {
|
||||
return progressBar;
|
||||
}
|
||||
|
||||
protected getDisplayRepeatMode(repeatMode: number): string {
|
||||
const repeatModesFormatted = new Map([
|
||||
[0, 'disabled'],
|
||||
[1, 'track'],
|
||||
[2, 'queue'],
|
||||
[3, 'autoplay']
|
||||
]);
|
||||
|
||||
if (repeatMode === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const loopModeUserString: string = repeatModesFormatted.get(repeatMode)!;
|
||||
const icon = repeatMode === 3 ? this.embedOptions.icons.autoplay : this.embedOptions.icons.loop;
|
||||
return (
|
||||
`**${icon} Looping**\n` +
|
||||
`Loop mode is set to **\`${loopModeUserString}\`**. You can change it with **\`/loop\`**.\n\n`
|
||||
);
|
||||
}
|
||||
|
||||
abstract execute(
|
||||
params: BaseInteractionParams
|
||||
): Promise<Message<boolean> | ApplicationCommandOptionChoiceData | void>;
|
||||
|
||||
Reference in new issue
Block a user