1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 22:06:01 +00:00
This commit is contained in:
MatteZ02
2020-02-20 22:31:03 +02:00
parent 6c0ed31c1b
commit 282ac01b3b
4 changed files with 13 additions and 6 deletions

View File

@ -2,6 +2,7 @@ module.exports = async function (guild, song, client, seek, play) {
const Discord = require('discord.js');
const ytdl = require('ytdl-core');
const getThumb = require('video-thumbnail-url');
const prism = require('prism-media');
const serverQueue = client.queue.get(guild.id);
if (!song) {
@ -10,8 +11,9 @@ module.exports = async function (guild, song, client, seek, play) {
client.queue.delete(guild.id);
return;
}
const dispatcher = serverQueue.connection
.play(await ytdl(song.url, { filter: "audio", highWaterMark: /*512*/1 << 25, volume: false }), { seek: seek, bitrate: 1024, passes: 10, volume: 1 })
.play(ytdl(song.url), { filter: "audio", highWaterMark: 1 << 25, volume: false, seek: seek, bitrate: 1024, passes: 10, bassboost: client.global.db.guilds[guild.id].bass })
.on("finish", reason => {
client.dispatcher.finish(client, reason, guild);
});