diff --git a/babel.config.json b/babel.config.json index 5f611ff..3e7174a 100644 --- a/babel.config.json +++ b/babel.config.json @@ -2,8 +2,5 @@ "presets": [ "@babel/preset-env", "@babel/preset-typescript" - ], - "plugins": [ - "@babel/plugin-proposal-class-properties" ] } \ No newline at end of file diff --git a/package.json b/package.json index 89b9eec..1aba907 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "typescript-eslint": "^7.17.0", "@babel/cli": "^7.24.8", "@babel/core": "^7.24.9", - "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/preset-env": "^7.24.8", "@babel/preset-typescript": "^7.24.7" }, diff --git a/src/structures/Manager.ts b/src/structures/Manager.ts index e34b02d..519e154 100644 --- a/src/structures/Manager.ts +++ b/src/structures/Manager.ts @@ -178,7 +178,9 @@ export class Manager extends TypedEmitter { let search = _query.query; let code = this.CheckURL(options.query); if (!/^https?:\/\//.test(search)) search = `${_source}:${search}`; - if (this.search_cache.get(code)) return this.search_cache.get(code); + if (options.cache !== false && this.options.cache.enabled !== false) { + if (this.search_cache.get(code)) return this.search_cache.get(code); + } try { const res = (await node.rest.get(`/v4/loadtracks?identifier=${encodeURIComponent(search)}`)) as LavalinkResponse; if (!res) throw new Error("Query not found.");