问题描述
例如,当我播放音乐时,我将音量设置为20%,当漫游器离开语音通道,然后播放另一首音乐时,音量又回到了100%,因此我必须手动重新设置再次提高到20%。
我想让我的机器人保存我设置的音量。有什么办法吗?
这是我的代码:
} else if (command === "volume" || command === "vol") {
if (!message.member.voice.channel) return message.channel.send("I'm sorry,but you need to be in a voice channel to set a volume!");
if (!serverQueue) return message.channel.send("There is nothing playing");
if (!args[1]) return message.channel.send(`The current volume is: **\`${serverQueue.volume}%\`**`);
if (isNaN(args[1]) || args[1] > 100) return message.channel.send("Volume only can be set in a range of **\`1\`** - **\`100\`**");
serverQueue.volume = args[1];
serverQueue.connection.dispatcher.setVolume(args[1] / 100);
return message.channel.send(`I set the volume to: **\`${args[1]}%\`**`);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)