mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 09:53:17 +00:00
parent
4750756ac0
commit
301eb70ea9
@ -3,6 +3,7 @@ module.exports = async function (guild, song, client, message, seek) {
|
|||||||
const ytdl = require('ytdl-core');
|
const ytdl = require('ytdl-core');
|
||||||
const serverQueue = client.queue.get(guild.id);
|
const serverQueue = client.queue.get(guild.id);
|
||||||
if (!song) {
|
if (!song) {
|
||||||
|
console.log("no song")
|
||||||
serverQueue.voiceChannel.leave();
|
serverQueue.voiceChannel.leave();
|
||||||
client.queue.delete(guild.id);
|
client.queue.delete(guild.id);
|
||||||
return;
|
return;
|
||||||
@ -23,13 +24,17 @@ module.exports = async function (guild, song, client, message, seek) {
|
|||||||
serverQueue.songs.shift();
|
serverQueue.songs.shift();
|
||||||
client.funcs.play(guild, serverQueue.songs[0], client, message);
|
client.funcs.play(guild, serverQueue.songs[0], client, message);
|
||||||
});
|
});
|
||||||
|
console.log("settings volume")
|
||||||
dispatcher.setVolume(serverQueue.volume / 10);
|
dispatcher.setVolume(serverQueue.volume / 10);
|
||||||
dispatcher.on("error", error => console.error(error));
|
dispatcher.on("error", error => console.error(error));
|
||||||
let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url));
|
console.log("defining data & songtime")
|
||||||
let songtime = (data.length_seconds * 1000).toFixed(0);
|
//let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url));
|
||||||
const embed = new Discord.RichEmbed()
|
//let songtime = (data.length_seconds * 1000).toFixed(0);
|
||||||
.setTitle(`:musical_note: Start playing: **${song.title}**`)
|
console.log("defining embed")
|
||||||
.setDescription(`Song duration: \`${client.funcs.msToTime(songtime)}\``)
|
//const embed = new Discord.RichEmbed()
|
||||||
.setColor("#b50002")
|
//.setTitle(`:musical_note: Start playing: **${song.title}**`)
|
||||||
serverQueue.textChannel.send(embed);
|
//.setDescription(`Song duration: \`${client.funcs.msToTime(songtime)}\``)
|
||||||
|
//.setColor("#b50002")
|
||||||
|
console.log("sending embed")
|
||||||
|
serverQueue.textChannel.send("Playing");
|
||||||
}
|
}
|
||||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -898,11 +898,6 @@
|
|||||||
"when": ">= 0.0.1"
|
"when": ">= 0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ffmpeg-static": {
|
|
||||||
"version": "2.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ffmpeg-static/-/ffmpeg-static-2.7.0.tgz",
|
|
||||||
"integrity": "sha512-Khjg/4tCBen58ixhXlkRNqs3hUKpTOlGOUrw859M09tdjeMkXyXRQ+YuJjGczRhGO7Y8fHPJZcQ37V/OzvZvjQ=="
|
|
||||||
},
|
|
||||||
"firebase": {
|
"firebase": {
|
||||||
"version": "6.6.2",
|
"version": "6.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/firebase/-/firebase-6.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/firebase/-/firebase-6.6.2.tgz",
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
"discord.js": "^11.5.1",
|
"discord.js": "^11.5.1",
|
||||||
"dotenv": "^8.1.0",
|
"dotenv": "^8.1.0",
|
||||||
"ffmpeg": "0.0.4",
|
"ffmpeg": "0.0.4",
|
||||||
"ffmpeg-static": "^2.7.0",
|
|
||||||
"firebase": "^6.6.2",
|
"firebase": "^6.6.2",
|
||||||
"firebase-admin": "^8.6.0",
|
"firebase-admin": "^8.6.0",
|
||||||
"fs": "0.0.1-security",
|
"fs": "0.0.1-security",
|
||||||
|
Loading…
Reference in New Issue
Block a user