play-dl больше не нужен, устанавливается discord-player

This commit is contained in:
Jonny_Bro (Nikita) 2023-03-28 14:53:45 +05:00
parent 60a7a4f949
commit bd6edcd309
4 changed files with 8 additions and 13 deletions

View file

@ -9,7 +9,6 @@ const BaseEvent = require("./BaseEvent.js"),
path = require("path"),
fs = require("fs").promises,
mongoose = require("mongoose"),
playdl = require("play-dl"),
moment = require("moment");
moment.relativeTimeThreshold("ss", 5);
@ -45,12 +44,6 @@ class JaBa extends Client {
this.player = Player.singleton(this);
playdl.getFreeClientID().then(id => playdl.setToken({
soundcloud: {
client_id: id,
},
}));
this.player.events.on("playerStart", async (queue, track) => {
const m = await queue.metadata.channel.send({ content: this.translate("music/play:NOW_PLAYING", { songName: track.title }, queue.metadata.channel.guild.data.language) });
if (track.durationMS > 1)

11
package-lock.json generated
View file

@ -32,8 +32,7 @@
"md5": "^2.2.1",
"moment": "^2.26.0",
"mongoose": "^5.13.15",
"ms": "^2.1.3",
"play-dl": "^1.9.6"
"ms": "^2.1.3"
},
"devDependencies": {
"eslint": "^8.23.0"
@ -3476,12 +3475,14 @@
"node_modules/play-audio": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz",
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ=="
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==",
"peer": true
},
"node_modules/play-dl": {
"version": "1.9.6",
"resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz",
"integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==",
"peer": true,
"dependencies": {
"play-audio": "^0.5.2"
},
@ -7024,12 +7025,14 @@
"play-audio": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz",
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ=="
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==",
"peer": true
},
"play-dl": {
"version": "1.9.6",
"resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.6.tgz",
"integrity": "sha512-JW44bQbME9fNfGhGXQ/rdcsHr4BfgJabVlSgpS9QY/NscfprFH1asv+q9atrZThP3+hHIpgtFNABccg9rFWlwg==",
"peer": true,
"requires": {
"play-audio": "^0.5.2"
}

View file

@ -35,8 +35,7 @@
"md5": "^2.2.1",
"moment": "^2.26.0",
"mongoose": "^5.13.15",
"ms": "^2.1.3",
"play-dl": "^1.9.6"
"ms": "^2.1.3"
},
"devDependencies": {
"eslint": "^8.23.0"