Choice locallization support and finalize other commands

This commit is contained in:
tacheometry committed 2023-12-17 07:21:08 +02:00
1 parent 694767fc03
commit d2de44faaa
16 files changed
+277 -179

No files matched your search

@@ -6,6 +6,7 @@ import { checkQueueCurrentTrack, checkQueueExists } from '../../utils/validation
import { checkInVoiceChannel, checkSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
import { TFunction } from 'i18next';
import { useServerTranslator } from '../../common/localeUtil';
import { formatRepeatModeDetailed } from '../../common/formattingUtils';
class ActionPauseResumeButton extends BaseComponentInteraction {
constructor() {
@@ -85,7 +86,7 @@ class ActionPauseResumeButton extends BaseComponentInteraction {
`**${this.embedOptions.icons.pauseResumed} ${
queue.node.isPaused() ? 'Paused Track' : 'Resumed track'
}**\n ${this.getDisplayTrackDurationAndUrl(queue.currentTrack!, translator)}\n\n` +
`${this.getDisplayRepeatMode(queue.repeatMode, translator, 'success')}`
`${formatRepeatModeDetailed(queue.repeatMode, this.embedOptions, translator, 'success')}`
)
.setThumbnail(track.thumbnail)
.setColor(this.embedOptions.colors.success);
@@ -6,6 +6,7 @@ import { checkQueueCurrentTrack, checkQueueExists } from '../../utils/validation
import { checkInVoiceChannel, checkSameVoiceChannel } from '../../utils/validation/voiceChannelValidator';
import { TFunction } from 'i18next';
import { useServerTranslator } from '../../common/localeUtil';
import { formatRepeatModeDetailed } from '../../common/formattingUtils';
class ActionSkipButton extends BaseComponentInteraction {
constructor() {
@@ -79,7 +80,7 @@ class ActionSkipButton extends BaseComponentInteraction {
.setDescription(
`**${this.embedOptions.icons.skipped} Skipped track**\n` +
`${this.getDisplayTrackDurationAndUrl(skippedTrack, translator)}\n\n` +
`${this.getDisplayRepeatMode(queue.repeatMode, translator, 'success')}`
`${formatRepeatModeDetailed(queue.repeatMode, this.embedOptions, translator, 'success')}`
)
.setThumbnail(skippedTrack.thumbnail)
.setColor(this.embedOptions.colors.success);