diff --git a/base/JaBa.js b/base/JaBa.js index 8bdac58c..43fe6228 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -34,7 +34,9 @@ class JaBa extends Client { this.databaseCache.usersReminds = new Collection(); this.databaseCache.mutedUsers = new Collection(); - this.player = Player.singleton(this); + this.player = Player.singleton(this, { + autoRegisterExtractor: false, + }); 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) }); @@ -84,6 +86,8 @@ class JaBa extends Client { this.logger.log(`Unable to connect to the Mongodb database. Error: ${err}`, "error"); }); + await this.player.extractors.loadDefault(); + const autoUpdateDocs = require("../helpers/autoUpdateDocs"); autoUpdateDocs.update(this); } diff --git a/commands/Music/play.js b/commands/Music/play.js index f51856f2..fe947921 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -82,8 +82,10 @@ class Play extends BaseCommand { * @returns */ async autocompleteRun(client, interaction) { - const query = interaction.options.getString("query"), - results = await client.player.search(query); + const query = interaction.options.getString("query"); + if (query.includes("http") || query === "") return; + + const results = await client.player.search(query); return interaction.respond( results.tracks.slice(0, 10).map(track => ({