Merge pull request #375 from pryzmian/main

chore: update volume command options
This commit is contained in:
Marius Begby authored and GitHub committed 2024-02-01 09:16:18 +01:00
commit 627da7e35a
1 file changed
-25
-25
View File
@@ -35,8 +35,6 @@ class VolumeCommand extends BaseSlashCommandInteraction {
if (!volume && volume !== 0) {
return await this.handleShowCurrentVolume(queue, logger, interaction, translator);
} else if (volume > 100 || volume < 0) {
return await this.handleInvalidVolumeInput(volume, logger, interaction, translator);
} else {
return await this.handleValidVolumeInput(volume, queue, logger, interaction, translator);
}
@@ -69,29 +67,6 @@ class VolumeCommand extends BaseSlashCommandInteraction {
});
}
private async handleInvalidVolumeInput(
volume: number,
logger: Logger,
interaction: ChatInputCommandInteraction,
translator: TFunction
) {
logger.debug('Volume specified was higher than 100% or lower than 0%.');
logger.debug('Responding with warning embed.');
return await interaction.editReply({
embeds: [
new EmbedBuilder()
.setDescription(
translator('commands.volume.invalidVolumeRange', {
icon: this.embedOptions.icons.warning,
wrongVolume: volume
})
)
.setColor(this.embedOptions.colors.warning)
]
});
}
private async handleValidVolumeInput(
volume: number,
queue: GuildQueue,