chore: upgrade dependencies #213

Merged
Anri merged 2 commits from upgrade-migration_dpv7 into main 2025-01-02 22:36:14 +01:00
9 changed files with 1791 additions and 400 deletions
Showing only changes of commit 9be710ef24 - Show all commits

2144
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -19,20 +19,19 @@
"author": "La confrérie du Kassoulait",
"license": "AGPL-3.0-only",
"dependencies": {
"@discord-player/extractor": "^4.5.1",
"@discordjs/rest": "^2.4.0",
"discord-player": "^6.7.1",
"discord-player-youtubei": "^1.3.5",
"discord.js": "^14.16.3",
"mediaplex": "^1.0.0",
"@discord-player/extractor": "^7.0.0",
"@discordjs/rest": "^2.4.2",
"discord-player": "^7.0.0",
"discord-player-youtubei": "^1.3.7",
"discord.js": "^14.17.2",
"moment-timezone": "^0.5.46",
"sqlite3": "^5.1.7",
"typescript": "^5.7.2",
"uuid": "^11.0.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "~8.17.0",
"@typescript-eslint/parser": "~8.17.0",
"@typescript-eslint/eslint-plugin": "~8.19.0",
"@typescript-eslint/parser": "~8.19.0",
"dotenv": "~16.4.7",
"prettier-eslint": "~16.3.0",
"ts-node-dev": "~2.0.0",

View file

@ -23,7 +23,7 @@ export default {
interaction: async (interaction: ChatInputCommandInteraction, client: Client) => {
const loc = getLocale(client, interaction.locale);
const queue = useQueue(interaction.guildId!);
const queue = useQueue();
if (queue) {
const embed = new EmbedBuilder();

View file

@ -104,7 +104,7 @@ export default {
if (!query) {
// Now playing
const queue = useQueue(interaction.guildId!);
const queue = useQueue();
if (queue) {
const track = queue.history.currentTrack;

View file

@ -94,7 +94,7 @@ export default {
const filename = getFilename(__filename);
const loc = getLocale(client, interaction.locale);
const queue = useQueue(interaction.guildId!);
const queue = useQueue();
const embed = new EmbedBuilder();

View file

@ -64,7 +64,7 @@ export default {
const filename = getFilename(__filename);
const loc = getLocale(client, interaction.locale);
const queue = useQueue(interaction.guildId!);
const queue = useQueue();
if (queue) {
const subcommand = interaction.options.getSubcommand();

View file

@ -37,7 +37,7 @@ export default {
const filename = getFilename(__filename);
const loc = getLocale(client, interaction.locale);
const queue = useQueue(interaction.guildId!);
const queue = useQueue();
const id = interaction.options.getNumber(loc_default?.get(`c_${filename}_opt1_name`) as string);

View file

@ -1,5 +1,6 @@
import { Client, Interaction, InteractionType } from "discord.js";
import { getLocale } from "../../utils/locales";
import { useMainPlayer } from "discord-player";
/** https://discord.js.org/#/docs/discord.js/main/class/Client?scrollTo=e-interactionCreate */
export default (interaction: Interaction, client: Client) => {
@ -14,6 +15,15 @@ export default (interaction: Interaction, client: Client) => {
});
}
if (interaction.guild) {
const player = useMainPlayer();
const data = {
guild: interaction.guild,
};
return player.context.provide(data, () => command.interaction(interaction, client));
}
return command.interaction(interaction, client);
}

View file

@ -7,6 +7,7 @@ import { loadLocales } from "./locales";
import { YoutubeiExtractor } from "discord-player-youtubei";
import { readSQL } from "./db";
import { isDev } from "./misc";
import { DefaultExtractors } from "@discord-player/extractor";
/** Creation of the client and definition of its properties */
export default async () => {
@ -46,14 +47,9 @@ export default async () => {
list: new Collection(),
};
const player = Player.singleton(client, {
skipFFmpeg: true,
ytdlOptions: {
filter: "audioonly",
quality: "highestaudio",
},
});
await player.extractors.loadDefault((ext) => ext !== "YouTubeExtractor");
const player = new Player(client, { skipFFmpeg: true });
await player.extractors.loadMulti(DefaultExtractors);
await player.extractors.register(YoutubeiExtractor, {});
console.log("Translations progression :");