magmastream
Advanced tools
Comparing version 2.5.7 to 2.5.8
@@ -393,2 +393,4 @@ /// <reference types="node" /> | ||
declare class Rest { | ||
/** The Node that this Rest instance is connected to. */ | ||
private node; | ||
/** The ID of the current session. */ | ||
@@ -395,0 +397,0 @@ private sessionId; |
@@ -8,2 +8,4 @@ "use strict"; | ||
class Rest { | ||
/** The Node that this Rest instance is connected to. */ | ||
node; | ||
/** The ID of the current session. */ | ||
@@ -16,2 +18,3 @@ sessionId; | ||
constructor(node) { | ||
this.node = node; | ||
this.url = `http${node.options.secure ? "s" : ""}://${node.options.host}:${node.options.port}`; | ||
@@ -56,3 +59,7 @@ this.sessionId = node.sessionId; | ||
} | ||
catch { | ||
catch (error) { | ||
if (error?.response?.status === 404) { | ||
this.node.destroy(); | ||
this.node.manager.createNode(this.node.options).connect(); | ||
} | ||
return null; | ||
@@ -59,0 +66,0 @@ } |
{ | ||
"name": "magmastream", | ||
"version": "2.5.7", | ||
"version": "2.5.8", | ||
"description": "A user-friendly Lavalink client designed for NodeJS.", | ||
@@ -19,6 +19,6 @@ "main": "dist/index.js", | ||
"@types/lodash": "^4.17.6", | ||
"@types/node": "^20.14.9", | ||
"@types/node": "^20.14.10", | ||
"@types/ws": "^8.5.10", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@typescript-eslint/eslint-plugin": "^7.16.0", | ||
"@typescript-eslint/parser": "^7.16.0", | ||
"eslint": "^8.57.0", | ||
@@ -25,0 +25,0 @@ "npm-run-all": "^4.1.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113096
2747