mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 09:12:43 +02:00
Added commands to set whether to reduce the volume when people speak and to set the target volume.
This commit is contained in:
parent
d6364ac2aa
commit
b42f27eba9
1 changed files with 51 additions and 0 deletions
|
@ -40,6 +40,22 @@ export default class implements Command {
|
||||||
.setName('value')
|
.setName('value')
|
||||||
.setDescription('whether bot responses to queue additions are only displayed to the requester')
|
.setDescription('whether bot responses to queue additions are only displayed to the requester')
|
||||||
.setRequired(true)))
|
.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
|
.addSubcommand(subcommand => subcommand
|
||||||
.setName('set-auto-announce-next-song')
|
.setName('set-auto-announce-next-song')
|
||||||
.setDescription('set whether to announce the next song in the queue automatically')
|
.setDescription('set whether to announce the next song in the queue automatically')
|
||||||
|
@ -197,6 +213,40 @@ export default class implements Command {
|
||||||
break;
|
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': {
|
case 'get': {
|
||||||
const embed = new EmbedBuilder().setTitle('Config');
|
const embed = new EmbedBuilder().setTitle('Config');
|
||||||
|
|
||||||
|
@ -212,6 +262,7 @@ export default class implements Command {
|
||||||
'Add to queue reponses show for requester only': config.autoAnnounceNextSong ? 'yes' : 'no',
|
'Add to queue reponses show for requester only': config.autoAnnounceNextSong ? 'yes' : 'no',
|
||||||
'Default Volume': config.defaultVolume,
|
'Default Volume': config.defaultVolume,
|
||||||
'Default queue page size': config.defaultQueuePageSize,
|
'Default queue page size': config.defaultQueuePageSize,
|
||||||
|
'Reduce volume when people speak': config.turnDownVolumeWhenPeopleSpeak ? 'yes' : 'no',
|
||||||
};
|
};
|
||||||
|
|
||||||
let description = '';
|
let description = '';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue