diff --git a/base/JaBa.js b/base/JaBa.js index c7b17ab2..3730aa55 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -11,7 +11,7 @@ const BaseEvent = require("./BaseEvent.js"), path = require("path"), fs = require("fs").promises, mongoose = require("mongoose"), - // extractor = require("../helpers/extractor"), + extractor = require("../helpers/extractor"), playdl = require("play-dl"), moment = require("moment"); @@ -60,7 +60,7 @@ class JaBa extends Client { }); this.player = new Player(this); - // this.player.use("jaba", extractor); + this.player.use("jaba", extractor); this.player .on("trackStart", async (queue, track) => { diff --git a/commands/Music/play.js b/commands/Music/play.js index 8f64216e..b814229d 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -1,6 +1,5 @@ const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); -const BaseCommand = require("../../base/BaseCommand"), - playdl = require("play-dl"); +const BaseCommand = require("../../base/BaseCommand"); class Play extends BaseCommand { /** @@ -44,8 +43,9 @@ class Play extends BaseCommand { const searchResult = await client.player.search(query, { requestedBy: interaction.user, - // searchEngine: "jaba" + searchEngine: "jaba" }).catch(() => {}); + if (!searchResult || !searchResult.tracks.length) return interaction.editReply({ content: interaction.translate("music/play:NO_RESULT", { query @@ -53,18 +53,12 @@ class Play extends BaseCommand { }); const queue = client.player.getQueue(interaction.guildId) || client.player.createQueue(interaction.guild, { - metadata: { - channel: interaction.channel - }, + metadata: { channel: interaction.channel }, leaveOnEnd: true, leaveOnStop: true, bufferingTimeout: 1000, disableVolume: false, - spotifyBridge: false, - async onBeforeCreateStream(track, source) { - if (source === "youtube" || source === "soundcloud") - return (await playdl.stream(track.url, { discordPlayerCompatibility: true })).stream; - } + spotifyBridge: false }); searchResult.playlist ? queue.addTracks(searchResult.tracks) : queue.addTrack(searchResult.tracks[0]); diff --git a/helpers/extractor.js b/helpers/extractor.js index 2afa5987..8ed40d1e 100644 --- a/helpers/extractor.js +++ b/helpers/extractor.js @@ -1,7 +1,6 @@ const playdl = require("play-dl"); -const fetch = require("node-fetch"); -const { getData, getPreview, getTracks } = require("spotify-url-info")(fetch); -const Youtube = require("youtube-sr").default; +// const fetch = require("node-fetch"); +// const { getData, getPreview, getTracks } = require("spotify-url-info")(fetch); /* Thanks to: https://github.com/nizewn/Dodong @@ -20,6 +19,11 @@ const Youtube = require("youtube-sr").default; module.exports = { important: true, validate: () => true, // true, since we're also using this for searches when query isnt a valid link + /** + * + * @param {String} query + * @returns + */ getInfo: async (query) => { // eslint-disable-next-line no-async-promise-executor, no-unused-vars return new Promise(async (resolve, reject) => { @@ -38,7 +42,7 @@ module.exports = { views: 0, author: info.publisher ? info.publisher.name ?? info.publisher.artist ?? info.publisher.writer_composer ?? null : null, description: "", - url: info.permalink, + url: info.url, source: "soundcloud-custom" }; return resolve({ playlist: null, info: [track] }); @@ -55,17 +59,17 @@ module.exports = { views: 0, author: track.publisher ? track.publisher.name ?? track.publisher.artist ?? track.publisher.writer_composer ?? null : null, description: "", - url: track.permalink, + url: track.url, source: "soundcloud-custom" }; }); const playlist = { title: info.name, description: "", - thumbnail: null, + thumbnail: info.user.thumbnail, type: "playlist", source: "soundcloud-custom", - author: info.user, + author: info.user.name, id: info.id, url: info.url, rawPlaylist: info @@ -74,7 +78,7 @@ module.exports = { } } // ---- end soundcloud ---- - + /* // ---- start spotify ---- if (query.includes("open.spotify.com") || query.includes("play.spotify.com")) { const info = await getPreview(query); @@ -85,7 +89,7 @@ module.exports = { duration: spotifyTrack.duration_ms, thumbnail: info.image, async engine() { - return (await playdl.stream(await Youtube.search(`${info.artist} ${info.title} lyric`, { limit: 1, type: "video", safeSearch: true }).then(x => x[0] ? `https://youtu.be/${x[0].id}` : "https://youtu.be/Wch3gJG2GJ4"), { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(await Youtube.search(`${info.artist} ${info.title} lyric`, { limit: 1, type: "video", safeSearch: true }).then(x => x[0] ? `https://youtu.be/${x[0].id}` : "https://youtu.be/Wch3gJG2GJ4"), { discordPlayerCompatibility: true })).stream; }, views: 0, author: info.artist, @@ -102,7 +106,7 @@ module.exports = { duration: track.duration_ms, thumbnail: track.album && track.album.images.length ? track.album.images[0].url : null, async engine() { - return (await playdl.stream(await Youtube.search(`${track.artists[0].name} ${track.name} lyric`, { limit: 1, type: "video", safeSearch: true }).then(x => x[0] ? `https://youtu.be/${x[0].id}` : "https://youtu.be/Wch3gJG2GJ4"), { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(await Youtube.search(`${track.artists[0].name} ${track.name} lyric`, { limit: 1, type: "video", safeSearch: true }).then(x => x[0] ? `https://youtu.be/${x[0].id}` : "https://youtu.be/Wch3gJG2GJ4"), { discordPlayerCompatibility: true })).stream; }, views: 0, author: track.artists ? track.artists[0].name : null, @@ -126,20 +130,19 @@ module.exports = { } } // ---- end spotify ---- + */ + if (query.startsWith("http") && !query.includes("&list")) query = query.split("&")[0]; - if (query.startsWith("https")) { - query = query.split("&")[0]; - } - if (query.startsWith("https") && playdl.yt_validate(query) === "video") { + if (query.startsWith("http") && playdl.yt_validate(query) === "video") { if (query.includes("music.youtube")) { const info = await playdl.video_info(query); - if(!info) return resolve({ playlist: null, info: null }); + if (!info) return resolve({ playlist: null, info: null }); const track = { title: info.video_details.title, duration: info.video_details.durationInSec * 1000, thumbnail: info.video_details.thumbnails[0].url, async engine() { - return (await playdl.stream(`https://music.youtube.com/watch?v=${info.video_details.id}`, { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(`https://music.youtube.com/watch?v=${info.video_details.id}`, { discordPlayerCompatibility: true })).stream; }, views: info.video_details.views, author: info.video_details.channel.name, @@ -154,14 +157,14 @@ module.exports = { } const info = await playdl.video_info(query); - if(!info) return resolve({ playlist: null, info: null }); + if (!info) return resolve({ playlist: null, info: null }); const track = { title: info.video_details.title, duration: info.video_details.durationInSec * 1000, thumbnail: info.video_details.thumbnails[0].url, async engine() { - return (await playdl.stream(info.video_details.url, { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(info.video_details.url, { discordPlayerCompatibility: true })).stream; }, views: info.video_details.views, author: info.video_details.channel.name, @@ -182,7 +185,7 @@ module.exports = { duration: track.durationInSec * 1000, thumbnail: track.thumbnails[0].url, async engine() { - return (await playdl.stream(`https://music.youtube.com/watch?v=${track.id}`, { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(`https://music.youtube.com/watch?v=${track.id}`, { discordPlayerCompatibility: true })).stream; }, views: track.views, author: track.channel.name, @@ -197,10 +200,10 @@ module.exports = { description: "", thumbnail: info.thumbnail ? info.thumbnail.url : null, type: "playlist", - source: "youtube-music-playlist-custom", author: info.channel.name, id: info.id, url: info.url, + source: "youtube-music-playlist-custom", rawPlaylist: info }; return resolve({ playlist: playlist, info: tracks }); @@ -214,7 +217,7 @@ module.exports = { duration: track.durationInSec * 1000, thumbnail: track.thumbnails ? track.thumbnails[0] ? track.thumbnails[0].url : null : null, async engine() { - return (await playdl.stream(await Youtube.search(track.url, { limit: 1, type: "video", safeSearch: true }).then(x => x[0] ? `https://youtu.be/${x[0].id}` : "https://youtu.be/Wch3gJG2GJ4"), { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(track.url, { discordPlayerCompatibility: true })).stream; }, views: track.views, author: track.channel.name, @@ -238,24 +241,24 @@ module.exports = { return resolve({ playlist: playlist, info: tracks }); } - const search = await playdl.search(query, { - limit: 1 - }); + // search on youtube + const search = await playdl.search(query, { limit: 1 }); if (search) { + const found = search[0]; const track = { - title: search[0].title, - duration: search[0].durationInSec * 1000, - thumbnail: search[0].thumbnails[0].url, + title: found.title, + duration: found.durationInSec * 1000, + thumbnail: found.thumbnails[0].url, async engine() { - return (await playdl.stream(search[0].url, { discordPlayerCompatibility : true })).stream; + return (await playdl.stream(found.url, { discordPlayerCompatibility: true })).stream; }, - views: search[0].views, - author: search[0].channel.name, + views: found.views, + author: found.channel.name, description: "", - url: search[0].url, - related_videos: search[0].related_videos, - raw: search[0], + url: found.url, + related_videos: found.related_videos, + raw: found, source: "youtube-custom" }; @@ -263,7 +266,7 @@ module.exports = { } return resolve({ playlist: null, info: null }); - } catch(error) { + } catch (error) { console.log(`Extractor: An error occurred while attempting to resolve ${query} :\n${error}`); return resolve({ playlist: null, info: null }); } diff --git a/package-lock.json b/package-lock.json index 7ae46b7b..ae32eaed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@discord-player/extractor": "^3.0.2", "@discordjs/opus": "^0.8.0", - "@discordjs/rest": "^1.0.0", + "@discordjs/rest": "^1.1.0", "@discordjs/voice": "^0.11.0", "amethyste-api": "github:Androz2091/amethyste-api", "btoa": "^1.2.1", @@ -19,10 +19,10 @@ "canvas": "^2.9.0", "chalk": "^4.1.0", "cron": "^1.7.2", - "discord-api-types": "^0.37.0", - "discord-giveaways": "^6.0.0", - "discord-player": "^5.3.0-dev.3", - "discord.js": "^14.1.2", + "discord-api-types": "^0.37.5", + "discord-giveaways": "^6.0.1", + "discord-player": "^5.3.1", + "discord.js": "^14.3.0", "ejs": "^3.1.3", "express": "^4.17.1", "express-session": "^1.17.0", @@ -197,12 +197,12 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", - "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.2.0.tgz", + "integrity": "sha512-ARy4BUTMU+S0ZI6605NDqfWO+qZqV2d/xfY32z3hVSsd9IaAKJBZ1ILTZLy87oIjW8+gUpQmk9Kt0ZP9bmmd8Q==", "dependencies": { "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.36.3", + "discord-api-types": "^0.37.3", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" @@ -211,15 +211,10 @@ "node": ">=16.9.0" } }, - "node_modules/@discordjs/builders/node_modules/discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - }, "node_modules/@discordjs/collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", - "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.1.0.tgz", + "integrity": "sha512-PQ2Bv6pnT7aGPCKWbvvNRww5tYCGpggIQVgpuF9TdDPeR6n6vQYxezXiLVOS9z2B62Dp4c+qepQ15SgJbLYtCQ==", "engines": { "node": ">=16.9.0" } @@ -265,27 +260,22 @@ } }, "node_modules/@discordjs/rest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", - "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.1.0.tgz", + "integrity": "sha512-yCrthRTQeUyNThQEpCk7bvQJlwQmz6kU0tf3dcWBv2WX3Bncl41x7Wc+v5b5OsIxfNYq38PvVtWircu9jtYZug==", "dependencies": { "@discordjs/collection": "^1.0.1", - "@sapphire/async-queue": "^1.3.2", + "@sapphire/async-queue": "^1.5.0", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.3", - "file-type": "^17.1.4", + "discord-api-types": "^0.37.3", + "file-type": "^17.1.6", "tslib": "^2.4.0", - "undici": "^5.8.0" + "undici": "^5.9.1" }, "engines": { "node": ">=16.9.0" } }, - "node_modules/@discordjs/rest/node_modules/discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - }, "node_modules/@discordjs/voice": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.11.0.tgz", @@ -366,9 +356,9 @@ } }, "node_modules/@sapphire/async-queue": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz", - "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" @@ -1351,14 +1341,14 @@ } }, "node_modules/discord-api-types": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.0.tgz", - "integrity": "sha512-6LlL0xceiZs/kQ5PeKe5inkcjR73vagt3oACsP/C5IWKjXfzLGKrXn6yRYgiHIeJyFZ1xVPRJYE4W/u8UTT4ig==" + "version": "0.37.5", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.5.tgz", + "integrity": "sha512-RhzoX02jw2M+n/AU5K74KTM4J8Sn3ZImUJvoA4lh+SDcrqi1ddSjrafciF4bECj4rPc2vHwoyyTNgbUwE8vbpA==" }, "node_modules/discord-giveaways": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.0.tgz", - "integrity": "sha512-Ii6LAy0XooFjlffNabpyzN1CxWz3W2nmQ+6cLUxRUTXBMdq2gsk9d15lXBTvyG01kxF6Ko6f7EZEb9D83Rrrvw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.1.tgz", + "integrity": "sha512-hs6Vtb62VdlV7NfB93Phaxc8FW0cH4N1Nkb0bXVZ2npgn73yGOFVmdp8bBP5gsC2ady9OAXXI8Gb66t1IddkFw==", "dependencies": { "deepmerge-ts": "^4.2.1", "serialize-javascript": "^6.0.0" @@ -1371,9 +1361,9 @@ } }, "node_modules/discord-player": { - "version": "5.3.0-dev.3", - "resolved": "https://registry.npmjs.org/discord-player/-/discord-player-5.3.0-dev.3.tgz", - "integrity": "sha512-rrbEBS4mzCyIGk5S9E5O0XWnC4nub2cmBAFr9pZLH7RWBX4+z2nhAt5VwemgenmW/RJy1rseuZZ75WqJDnrHnw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/discord-player/-/discord-player-5.3.1.tgz", + "integrity": "sha512-ADiq5H3NWm2kLq03qJ54Kfb5X+YwZzZkAB1uj+Y46SVnKjC9iOYXvO/R2GkdGfTvry8AtkyhdDHa+Gltl8epuw==", "dependencies": { "@discordjs/voice": "^0.11.0", "libsodium-wrappers": "^0.7.10", @@ -1381,39 +1371,47 @@ "spotify-url-info": "^3.1.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.4.0", - "youtube-sr": "^4.2.0", + "youtube-sr": "^4.3.0", "ytdl-core": "^4.11.0" }, "funding": { "url": "https://github.com/Androz2091/discord-player?sponsor=1" } }, - "node_modules/discord.js": { - "version": "14.1.2", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.2.tgz", - "integrity": "sha512-apdWNLkjAkeEnuNpB8H6rS/4OgrXQlSAjuuzeodjCOdIXy3OwOjD314V/HiSttcAlr9+r3ONhaT5qvbDad5SIg==", + "node_modules/discord-player/node_modules/ytdl-core": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.11.0.tgz", + "integrity": "sha512-Q3hCLiUA9AOGQXzPvno14GN+HgF9wsO1ZBHlj0COTcyxjIyFpWvMfii0UC4/cAbVaIjEdbWB71GdcGuc4J1Lmw==", "dependencies": { - "@discordjs/builders": "^1.1.0", - "@discordjs/collection": "^1.0.1", - "@discordjs/rest": "^1.0.1", + "m3u8stream": "^0.8.6", + "miniget": "^4.2.2", + "sax": "^1.1.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/discord.js": { + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.3.0.tgz", + "integrity": "sha512-CpIwoAAuELiHSgVKRMzsCADS6ZlJwAZ9RlvcJYdEgS00aW36dSvXyBgE+S3pigkc7G+jU6BEalMUWIJFveqrBQ==", + "dependencies": { + "@discordjs/builders": "^1.2.0", + "@discordjs/collection": "^1.1.0", + "@discordjs/rest": "^1.1.0", "@sapphire/snowflake": "^3.2.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.36.3", + "discord-api-types": "^0.37.3", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", - "undici": "^5.8.0", + "undici": "^5.9.1", "ws": "^8.8.1" }, "engines": { "node": ">=16.9.0" } }, - "node_modules/discord.js/node_modules/discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2027,9 +2025,9 @@ } }, "node_modules/file-type": { - "version": "17.1.4", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.4.tgz", - "integrity": "sha512-3w/rJUUPBj6CYhVER3D5JCKwYJJiC36uj5dP+LnyubHI6H6FJo1TeWVCEA09YLVoZqV3/mLP26j9+Pz1GjAyjQ==", + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", "dependencies": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0-alpha.9", @@ -3601,11 +3599,11 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "node_modules/peek-readable": { - "version": "5.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0-alpha.5.tgz", - "integrity": "sha512-pJohF/tDwV3ntnT5+EkUo4E700q/j/OCDuPxtM+5/kFGjyOai/sK4/We4Cy1MB2OiTQliWU5DxPvYIKQAdPqAA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" }, "funding": { "type": "github", @@ -4265,15 +4263,15 @@ } }, "node_modules/strtok3": { - "version": "7.0.0-alpha.9", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.9.tgz", - "integrity": "sha512-G8WxjBFjTZ77toVElv1i7k3jCXNkBB14FVaZ/6LIOka/WGo4La5XHLrU7neFVLdKbXESZf4BejVKZu5maOmocA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", "dependencies": { "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.0.0-alpha.5" + "peek-readable": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" }, "funding": { "type": "github", @@ -4370,15 +4368,15 @@ } }, "node_modules/token-types": { - "version": "5.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.0-alpha.2.tgz", - "integrity": "sha512-EsG9UxAW4M6VATrEEjhPFTKEUi1OiJqTUMIZOGBN49fGxYjZB36k0p7to3HZSmWRoHm1QfZgrg3e02fpqAt5fQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", "dependencies": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" }, "funding": { "type": "github", @@ -4471,9 +4469,9 @@ } }, "node_modules/undici": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", - "integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.10.0.tgz", + "integrity": "sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==", "engines": { "node": ">=12.18" } @@ -4677,19 +4675,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/youtube-sr/-/youtube-sr-4.3.0.tgz", "integrity": "sha512-cRMOeJZi/DYIRqru0R9UsBLwkj4tQvekldnCj4MZOT+ijlfesrllbUDXqKuA2RbYA4ByJlFf9wxZ1ndvuCJ5Ow==" - }, - "node_modules/ytdl-core": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.11.0.tgz", - "integrity": "sha512-Q3hCLiUA9AOGQXzPvno14GN+HgF9wsO1ZBHlj0COTcyxjIyFpWvMfii0UC4/cAbVaIjEdbWB71GdcGuc4J1Lmw==", - "dependencies": { - "m3u8stream": "^0.8.6", - "miniget": "^4.2.2", - "sax": "^1.1.3" - }, - "engines": { - "node": ">=12" - } } }, "dependencies": { @@ -4821,28 +4806,21 @@ } }, "@discordjs/builders": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", - "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.2.0.tgz", + "integrity": "sha512-ARy4BUTMU+S0ZI6605NDqfWO+qZqV2d/xfY32z3hVSsd9IaAKJBZ1ILTZLy87oIjW8+gUpQmk9Kt0ZP9bmmd8Q==", "requires": { "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.36.3", + "discord-api-types": "^0.37.3", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" - }, - "dependencies": { - "discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - } } }, "@discordjs/collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", - "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.1.0.tgz", + "integrity": "sha512-PQ2Bv6pnT7aGPCKWbvvNRww5tYCGpggIQVgpuF9TdDPeR6n6vQYxezXiLVOS9z2B62Dp4c+qepQ15SgJbLYtCQ==" }, "@discordjs/node-pre-gyp": { "version": "0.4.4", @@ -4877,24 +4855,17 @@ } }, "@discordjs/rest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", - "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.1.0.tgz", + "integrity": "sha512-yCrthRTQeUyNThQEpCk7bvQJlwQmz6kU0tf3dcWBv2WX3Bncl41x7Wc+v5b5OsIxfNYq38PvVtWircu9jtYZug==", "requires": { "@discordjs/collection": "^1.0.1", - "@sapphire/async-queue": "^1.3.2", + "@sapphire/async-queue": "^1.5.0", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.3", - "file-type": "^17.1.4", + "discord-api-types": "^0.37.3", + "file-type": "^17.1.6", "tslib": "^2.4.0", - "undici": "^5.8.0" - }, - "dependencies": { - "discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - } + "undici": "^5.9.1" } }, "@discordjs/voice": { @@ -4967,9 +4938,9 @@ } }, "@sapphire/async-queue": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz", - "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", + "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==" }, "@sapphire/shapeshift": { "version": "3.5.1", @@ -5740,23 +5711,23 @@ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, "discord-api-types": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.0.tgz", - "integrity": "sha512-6LlL0xceiZs/kQ5PeKe5inkcjR73vagt3oACsP/C5IWKjXfzLGKrXn6yRYgiHIeJyFZ1xVPRJYE4W/u8UTT4ig==" + "version": "0.37.5", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.5.tgz", + "integrity": "sha512-RhzoX02jw2M+n/AU5K74KTM4J8Sn3ZImUJvoA4lh+SDcrqi1ddSjrafciF4bECj4rPc2vHwoyyTNgbUwE8vbpA==" }, "discord-giveaways": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.0.tgz", - "integrity": "sha512-Ii6LAy0XooFjlffNabpyzN1CxWz3W2nmQ+6cLUxRUTXBMdq2gsk9d15lXBTvyG01kxF6Ko6f7EZEb9D83Rrrvw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.1.tgz", + "integrity": "sha512-hs6Vtb62VdlV7NfB93Phaxc8FW0cH4N1Nkb0bXVZ2npgn73yGOFVmdp8bBP5gsC2ady9OAXXI8Gb66t1IddkFw==", "requires": { "deepmerge-ts": "^4.2.1", "serialize-javascript": "^6.0.0" } }, "discord-player": { - "version": "5.3.0-dev.3", - "resolved": "https://registry.npmjs.org/discord-player/-/discord-player-5.3.0-dev.3.tgz", - "integrity": "sha512-rrbEBS4mzCyIGk5S9E5O0XWnC4nub2cmBAFr9pZLH7RWBX4+z2nhAt5VwemgenmW/RJy1rseuZZ75WqJDnrHnw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/discord-player/-/discord-player-5.3.1.tgz", + "integrity": "sha512-ADiq5H3NWm2kLq03qJ54Kfb5X+YwZzZkAB1uj+Y46SVnKjC9iOYXvO/R2GkdGfTvry8AtkyhdDHa+Gltl8epuw==", "requires": { "@discordjs/voice": "^0.11.0", "libsodium-wrappers": "^0.7.10", @@ -5764,33 +5735,38 @@ "spotify-url-info": "^3.1.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.4.0", - "youtube-sr": "^4.2.0", + "youtube-sr": "^4.3.0", "ytdl-core": "^4.11.0" + }, + "dependencies": { + "ytdl-core": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.11.0.tgz", + "integrity": "sha512-Q3hCLiUA9AOGQXzPvno14GN+HgF9wsO1ZBHlj0COTcyxjIyFpWvMfii0UC4/cAbVaIjEdbWB71GdcGuc4J1Lmw==", + "requires": { + "m3u8stream": "^0.8.6", + "miniget": "^4.2.2", + "sax": "^1.1.3" + } + } } }, "discord.js": { - "version": "14.1.2", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.2.tgz", - "integrity": "sha512-apdWNLkjAkeEnuNpB8H6rS/4OgrXQlSAjuuzeodjCOdIXy3OwOjD314V/HiSttcAlr9+r3ONhaT5qvbDad5SIg==", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.3.0.tgz", + "integrity": "sha512-CpIwoAAuELiHSgVKRMzsCADS6ZlJwAZ9RlvcJYdEgS00aW36dSvXyBgE+S3pigkc7G+jU6BEalMUWIJFveqrBQ==", "requires": { - "@discordjs/builders": "^1.1.0", - "@discordjs/collection": "^1.0.1", - "@discordjs/rest": "^1.0.1", + "@discordjs/builders": "^1.2.0", + "@discordjs/collection": "^1.1.0", + "@discordjs/rest": "^1.1.0", "@sapphire/snowflake": "^3.2.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.36.3", + "discord-api-types": "^0.37.3", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", - "undici": "^5.8.0", + "undici": "^5.9.1", "ws": "^8.8.1" - }, - "dependencies": { - "discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - } } }, "doctrine": { @@ -6271,9 +6247,9 @@ } }, "file-type": { - "version": "17.1.4", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.4.tgz", - "integrity": "sha512-3w/rJUUPBj6CYhVER3D5JCKwYJJiC36uj5dP+LnyubHI6H6FJo1TeWVCEA09YLVoZqV3/mLP26j9+Pz1GjAyjQ==", + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", "requires": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0-alpha.9", @@ -7462,9 +7438,9 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "peek-readable": { - "version": "5.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0-alpha.5.tgz", - "integrity": "sha512-pJohF/tDwV3ntnT5+EkUo4E700q/j/OCDuPxtM+5/kFGjyOai/sK4/We4Cy1MB2OiTQliWU5DxPvYIKQAdPqAA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==" }, "play-audio": { "version": "0.5.2", @@ -7951,12 +7927,12 @@ "dev": true }, "strtok3": { - "version": "7.0.0-alpha.9", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.9.tgz", - "integrity": "sha512-G8WxjBFjTZ77toVElv1i7k3jCXNkBB14FVaZ/6LIOka/WGo4La5XHLrU7neFVLdKbXESZf4BejVKZu5maOmocA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", "requires": { "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.0.0-alpha.5" + "peek-readable": "^5.0.0" } }, "supports-color": { @@ -8035,9 +8011,9 @@ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, "token-types": { - "version": "5.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.0-alpha.2.tgz", - "integrity": "sha512-EsG9UxAW4M6VATrEEjhPFTKEUi1OiJqTUMIZOGBN49fGxYjZB36k0p7to3HZSmWRoHm1QfZgrg3e02fpqAt5fQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", "requires": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" @@ -8111,9 +8087,9 @@ } }, "undici": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", - "integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==" + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.10.0.tgz", + "integrity": "sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==" }, "universalify": { "version": "0.1.2", @@ -8269,16 +8245,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/youtube-sr/-/youtube-sr-4.3.0.tgz", "integrity": "sha512-cRMOeJZi/DYIRqru0R9UsBLwkj4tQvekldnCj4MZOT+ijlfesrllbUDXqKuA2RbYA4ByJlFf9wxZ1ndvuCJ5Ow==" - }, - "ytdl-core": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.11.0.tgz", - "integrity": "sha512-Q3hCLiUA9AOGQXzPvno14GN+HgF9wsO1ZBHlj0COTcyxjIyFpWvMfii0UC4/cAbVaIjEdbWB71GdcGuc4J1Lmw==", - "requires": { - "m3u8stream": "^0.8.6", - "miniget": "^4.2.2", - "sax": "^1.1.3" - } } } } diff --git a/package.json b/package.json index ece04984..5197d2bc 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dependencies": { "@discord-player/extractor": "^3.0.2", "@discordjs/opus": "^0.8.0", - "@discordjs/rest": "^1.0.0", + "@discordjs/rest": "^1.1.0", "@discordjs/voice": "^0.11.0", "amethyste-api": "github:Androz2091/amethyste-api", "btoa": "^1.2.1", @@ -22,10 +22,10 @@ "canvas": "^2.9.0", "chalk": "^4.1.0", "cron": "^1.7.2", - "discord-api-types": "^0.37.0", - "discord-giveaways": "^6.0.0", - "discord-player": "^5.3.0-dev.3", - "discord.js": "^14.1.2", + "discord-api-types": "^0.37.5", + "discord-giveaways": "^6.0.1", + "discord-player": "^5.3.1", + "discord.js": "^14.3.0", "ejs": "^3.1.3", "express": "^4.17.1", "express-session": "^1.17.0",