Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit

Permalink
Merge pull request #26 from FAYStarNext/dev
Browse files Browse the repository at this point in the history
use response.json() for parsing JSON
  • Loading branch information
EvarinDev authored Aug 24, 2024
2 parents dea1fc9 + 77ed023 commit 8a3e877
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/structures/Rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 4 additions & 0 deletions test/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8a3e877

Please sign in to comment.