aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/config.ts')
-rw-r--r--src/commands/config.ts78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/commands/config.ts b/src/commands/config.ts
index f866e82..01d9fe9 100644
--- a/src/commands/config.ts
+++ b/src/commands/config.ts
@@ -41,6 +41,22 @@ export default class implements Command {
.setDescription('whether bot responses to queue additions are only displayed to the requester')
.setRequired(true)))
.addSubcommand(subcommand => subcommand
+ .setName('set-reduce-vol-when-voice')
+ .setDescription('set whether to turn down the volume when people speak')
+ .addBooleanOption(option => option
+ .setName('value')
+ .setDescription('whether to turn down the volume when people speak')
+ .setRequired(true)))
+ .addSubcommand(subcommand => subcommand
+ .setName('set-reduce-vol-when-voice-target')
+ .setDescription('set the target volume when people speak')
+ .addIntegerOption(option => option
+ .setName('volume')
+ .setDescription('volume percentage (0 is muted, 100 is max & default)')
+ .setMinValue(0)
+ .setMaxValue(100)
+ .setRequired(true)))
+ .addSubcommand(subcommand => subcommand
.setName('set-auto-announce-next-song')
.setDescription('set whether to announce the next song in the queue automatically')
.addBooleanOption(option => option
@@ -57,6 +73,15 @@ export default class implements Command {
.setMaxValue(100)
.setRequired(true)))
.addSubcommand(subcommand => subcommand
+ .setName('set-default-queue-page-size')
+ .setDescription('set the default page size of the /queue command')
+ .addIntegerOption(option => option
+ .setName('page-size')
+ .setDescription('page size of the /queue command')
+ .setMinValue(1)
+ .setMaxValue(30)
+ .setRequired(true)))
+ .addSubcommand(subcommand => subcommand
.setName('get')
.setDescription('show all settings'));
@@ -171,6 +196,57 @@ export default class implements Command {
break;
}
+ case 'set-default-queue-page-size': {
+ const value = interaction.options.getInteger('page-size')!;
+
+ await prisma.setting.update({
+ where: {
+ guildId: interaction.guild!.id,
+ },
+ data: {
+ defaultQueuePageSize: value,
+ },
+ });
+
+ await interaction.reply('👍 default queue page size updated');
+
+ break;
+ }
+
+ case 'set-reduce-vol-when-voice': {
+ const value = interaction.options.getBoolean('value')!;
+
+ await prisma.setting.update({
+ where: {
+ guildId: interaction.guild!.id,
+ },
+ data: {
+ turnDownVolumeWhenPeopleSpeak: value,
+ },
+ });
+
+ await interaction.reply('👍 turn down volume setting updated');
+
+ break;
+ }
+
+ case 'set-reduce-vol-when-voice-target': {
+ const value = interaction.options.getInteger('volume')!;
+
+ await prisma.setting.update({
+ where: {
+ guildId: interaction.guild!.id,
+ },
+ data: {
+ turnDownVolumeWhenPeopleSpeakTarget: value,
+ },
+ });
+
+ await interaction.reply('👍 turn down volume target setting updated');
+
+ break;
+ }
+
case 'get': {
const embed = new EmbedBuilder().setTitle('Config');
@@ -185,6 +261,8 @@ export default class implements Command {
'Auto announce next song in queue': config.autoAnnounceNextSong ? 'yes' : 'no',
'Add to queue reponses show for requester only': config.autoAnnounceNextSong ? 'yes' : 'no',
'Default Volume': config.defaultVolume,
+ 'Default queue page size': config.defaultQueuePageSize,
+ 'Reduce volume when people speak': config.turnDownVolumeWhenPeopleSpeak ? 'yes' : 'no',
};
let description = '';