mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 22:15:37 +00:00
feat: set default player volume to 50%, allow player options to be configured from config
This commit is contained in:
1 parent
4622f184a3
commit
6826feaa10
1 file changed
+10
-6
+10
-6
@@ -1,7 +1,7 @@
|
|||||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||||
const { useMainPlayer } = require('discord-player');
|
const { useMainPlayer } = require('discord-player');
|
||||||
const { EmbedBuilder } = require('discord.js');
|
const { EmbedBuilder } = require('discord.js');
|
||||||
const { embedColors } = require('../config.json');
|
const { embedColors, playerOptions } = require('../config.json');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
@@ -67,11 +67,15 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
requestedBy: interaction.user,
|
requestedBy: interaction.user,
|
||||||
nodeOptions: {
|
nodeOptions: {
|
||||||
leaveOnEmptyCooldown: 60000,
|
leaveOnEmpty: playerOptions.leaveOnEmpty ?? true,
|
||||||
leaveOnEndCooldown: 60000,
|
leaveOnEmptyCooldown: playerOptions.leaveOnEmptyCooldown ?? 60000,
|
||||||
leaveOnStopCooldown: 60000,
|
leaveOnEnd: playerOptions.leaveOnEnd ?? true,
|
||||||
maxSize: 10000,
|
leaveOnEndCooldown: playerOptions.leaveOnEndCooldown ?? 60000,
|
||||||
maxHistorySize: 100
|
leaveOnStop: playerOptions.leaveOnStop ?? true,
|
||||||
|
leaveOnStopCooldown: playerOptions.leaveOnStopCooldown ?? 60000,
|
||||||
|
maxSize: playerOptions.maxQueueSize ?? 1000,
|
||||||
|
maxHistorySize: playerOptions.maxHistorySize ?? 100,
|
||||||
|
volume: playerOptions.defaultVolume ?? 50
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user