diff --git a/package.json b/package.json index e575b32..7b922db 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,13 @@ "name": "sunday.ts", "main": "dist/index.js", "types": "dist/index.d.ts", - "version": "1.0.17", + "version": "1.0.18", "description": "Sunday a lavalink wrapper", "license": "MIT", "author": "FAYStarNext", "scripts": { "build:js": "npx babel src --out-dir dist --extensions \".ts,.tsx\" --source-maps inline", "lint": "npx eslint src/**/*.ts", - "test:connect": "bun test/connect.ts", "test:manager": "bun test/manager.ts", "test:player": "bun test/player.ts" }, diff --git a/src/structures/Rest.ts b/src/structures/Rest.ts index 17582b1..f0c0df8 100644 --- a/src/structures/Rest.ts +++ b/src/structures/Rest.ts @@ -53,7 +53,7 @@ export class Rest { }, body: JSON.stringify(body), }); - return JSON.parse(await response.text()); + return await response.json(); } catch(error) { if (error?.response?.status === 404) { this.node.destroy(); diff --git a/test/player.ts b/test/player.ts index 7f76cb8..9cc1821 100644 --- a/test/player.ts +++ b/test/player.ts @@ -18,6 +18,10 @@ let manager = new Manager({ password: 'youshallnotpass', }, ], + caches: { + enabled: true, + time: 60000, + }, clientId: "1234567890", send(guild_id, payload) { const guild = client.guilds.cache.get(guild_id);