This commit is contained in:
MatteZ02
2020-03-02 22:54:01 +02:00
parent df66048e95
commit f83f0c012b
6 changed files with 3 additions and 29 deletions

View File

@ -2,9 +2,7 @@ module.exports = async function (msg, voiceChannel, client, url) {
const radio = client.radio.get(msg.guild.id);
if (radio) {
radio.songs.push(song);
if (playlist) return;
return msg.channel.send(`<:green_check_mark:674265384777416705> **${song.title}** has been added to the queue!`);
radio.connection.dispatcher.end('Stopped');
}
const construct = {

View File

@ -3,8 +3,8 @@ module.exports = async function (guild, client, url) {
const radio = client.radio.get(guild.id);
const dispatcher = radio.connection
.play(url, { bitrate: 1024, passes: 10, volume: 1, highWaterMark: 1 << 25 })
.on("finish", reason => {
client.dispatcher.finish(client, reason, guild);
.on("finish", () => {
radio.delete();
});
dispatcher.on('start', () => {
dispatcher.player.streamingData.pausedTime = 0;