update dependencies and use new youtube extractor (#138)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

Reviewed-on: #138
Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Co-committed-by: Mylloon <kennel.anri@tutanota.com>
This commit is contained in:
Mylloon 2024-07-31 13:47:47 +02:00 committed by Mylloon
parent 06adea29d7
commit 3e626b8b0e
Signed by: Forgejo
GPG key ID: E72245C752A07631
4 changed files with 174 additions and 1165 deletions

1320
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -17,21 +17,21 @@
"author": "La confrérie du Kassoulait",
"license": "AGPL-3.0-only",
"dependencies": {
"@discord-player/extractor": "^4.4.7",
"@discord-player/extractor": "^4.5.0",
"@discordjs/rest": "^2.3.0",
"@distube/ytdl-core": "^4.13.4",
"@types/sqlite3": "^3.1.11",
"@types/uuid": "^9.0.8",
"discord-player": "^6.6.10",
"@types/uuid": "^10.0.0",
"discord-player": "^6.7.1",
"discord-player-youtubei": "^1.2.1",
"discord.js": "^14.15.3",
"mediaplex": "^0.0.9",
"sqlite3": "^5.1.7",
"typescript": "^5.4.5",
"typescript": "^5.5.4",
"uuid": "^10.0.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "~7.13.0",
"@typescript-eslint/parser": "~7.13.0",
"@typescript-eslint/eslint-plugin": "~7.18.0",
"@typescript-eslint/parser": "~7.18.0",
"dotenv": "~16.4.5",
"prettier-eslint": "~16.3.0",
"ts-node-dev": "~2.0.0"

View file

@ -181,6 +181,7 @@ export default {
delay,
player.search(query, {
requestedBy: interaction.user,
searchEngine: "spotifySearch",
}),
])
.then((res) => {

View file

@ -4,6 +4,7 @@ import { readFileSync } from "fs";
import { Database } from "sqlite3";
import "../modules/client";
import { loadLocales } from "./locales";
import { YoutubeiExtractor } from "discord-player-youtubei";
/** Creation of the client and definition of its properties. */
export default async () => {
@ -44,7 +45,8 @@ export default async () => {
quality: "highestaudio",
},
});
await player.extractors.loadDefault();
await player.extractors.loadDefault((ext) => ext !== "YouTubeExtractor");
await player.extractors.register(YoutubeiExtractor, {});
console.log("Translations progression :");
client.locales = await loadLocales(client.config.default_lang);