Comparing version 3.2.3 to 3.3.0
{ | ||
"name": "shoukaku", | ||
"version": "3.2.3", | ||
"version": "3.3.0", | ||
"description": "A stable and updated wrapper around Lavalink", | ||
@@ -43,9 +43,9 @@ "main": "dist/index.js", | ||
"node-fetch": "^2.6.7", | ||
"ws": "^8.11.0" | ||
"ws": "^8.12.0" | ||
}, | ||
"devDependencies": { | ||
"@augu/eslint-config": "^3.0.0", | ||
"@types/node": "^18.11.17", | ||
"@types/node": "^18.11.18", | ||
"@types/node-fetch": "^2.6.2", | ||
"@types/ws": "^8.5.3", | ||
"@types/ws": "^8.5.4", | ||
"@typescript-eslint/eslint-plugin": "^5.36.1", | ||
@@ -56,5 +56,5 @@ "@typescript-eslint/parser": "^5.36.1", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.23", | ||
"typedoc": "^0.23.24", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
@@ -60,3 +60,3 @@ "use strict"; | ||
this.player.node.players.delete(this.guildId); | ||
// this.player.clean(); | ||
this.player.clean(); | ||
this.destroyLavalinkPlayer(); | ||
@@ -63,0 +63,0 @@ this.state = Constants_1.State.DISCONNECTED; |
@@ -238,2 +238,6 @@ /// <reference types="node" /> | ||
/** | ||
* Ping represents the number of milliseconds between heartbeat and ack. Could be `-1` if not connected | ||
*/ | ||
ping: number; | ||
/** | ||
* Position in ms of current track | ||
@@ -240,0 +244,0 @@ */ |
@@ -58,2 +58,3 @@ "use strict"; | ||
this.position = 0; | ||
this.ping = 0; | ||
this.filters = new Filters(); | ||
@@ -324,2 +325,4 @@ } | ||
this.position = json.state.position; | ||
// ping property require lavalink >=3.5.1 | ||
this.ping = json.state.ping ?? 0; | ||
this.emit('update', json); | ||
@@ -326,0 +329,0 @@ } |
@@ -254,2 +254,3 @@ "use strict"; | ||
this.reconnects++; | ||
this.emit("reconnecting", this.name, `[Socket] -> [${this.name}] : Reconnecting in ${this.manager.options.reconnectInterval}ms. ${this.manager.options.reconnectTries - this.reconnects} tries left`, this.reconnect, this.manager.options.reconnectInterval, this.manager.options.reconnectTries - this.reconnects); | ||
this.emit('debug', this.name, `[Socket] -> [${this.name}] : Reconnecting in ${this.manager.options.reconnectInterval}ms. ${this.manager.options.reconnectTries - this.reconnects} tries left`); | ||
@@ -256,0 +257,0 @@ setTimeout(() => this.connect(), this.manager.options.reconnectInterval); |
@@ -30,3 +30,3 @@ "use strict"; | ||
*/ | ||
async resolve(identifier) { | ||
resolve(identifier) { | ||
const options = { | ||
@@ -36,3 +36,3 @@ endpoint: '/loadtracks', | ||
}; | ||
return await this.fetch(options); | ||
return this.fetch(options); | ||
} | ||
@@ -44,3 +44,3 @@ /** | ||
*/ | ||
async decode(track) { | ||
decode(track) { | ||
const options = { | ||
@@ -50,3 +50,3 @@ endpoint: '/decodetrack', | ||
}; | ||
return await this.fetch(options); | ||
return this.fetch(options); | ||
} | ||
@@ -58,3 +58,3 @@ /** | ||
*/ | ||
async getRoutePlannerStatus() { | ||
getRoutePlannerStatus() { | ||
const options = { | ||
@@ -64,3 +64,3 @@ endpoint: '/routeplanner/status', | ||
}; | ||
return await this.fetch(options); | ||
return this.fetch(options); | ||
} | ||
@@ -72,3 +72,3 @@ /** | ||
*/ | ||
async unmarkFailedAddress(address) { | ||
unmarkFailedAddress(address) { | ||
const options = { | ||
@@ -82,3 +82,3 @@ endpoint: '/routeplanner/free/address', | ||
}; | ||
return await this.fetch(options); | ||
return this.fetch(options); | ||
} | ||
@@ -85,0 +85,0 @@ /** |
@@ -101,2 +101,7 @@ /// <reference types="node" /> | ||
/** | ||
* Emitted when reconnect tries are occurring and how many tries are left | ||
* @eventProperty | ||
*/ | ||
on(event: 'reconnecting', listener: (name: string, info: string, tries: number, triesLeft: number, reconnectInterval: number) => void): this; | ||
/** | ||
* Emitted when data useful for debugging is produced | ||
@@ -126,2 +131,3 @@ * @eventProperty | ||
on(event: 'disconnect', listener: (name: string, players: Player[], moved: boolean) => void): this; | ||
once(event: 'reconnecting', listener: (name: string, info: string, tries: number, triesLeft: number, reconnectInterval: number) => void): this; | ||
once(event: 'debug', listener: (name: string, info: string) => void): this; | ||
@@ -132,2 +138,3 @@ once(event: 'error', listener: (name: string, error: Error) => void): this; | ||
once(event: 'disconnect', listener: (name: string, players: Player[], moved: boolean) => void): this; | ||
off(event: 'reconnecting', listener: (name: string, info: string, tries: number, triesLeft: number, reconnectInterval: number) => void): this; | ||
off(event: 'debug', listener: (name: string, info: string) => void): this; | ||
@@ -134,0 +141,0 @@ off(event: 'error', listener: (name: string, error: Error) => void): this; |
@@ -59,2 +59,3 @@ "use strict"; | ||
node.on('debug', (...args) => this.emit('debug', ...args)); | ||
node.on('reconnecting', (...args) => this.emit('reconnecting', ...args)); | ||
node.on('error', (...args) => this.emit('error', ...args)); | ||
@@ -61,0 +62,0 @@ node.on('close', (...args) => this.emit('close', ...args)); |
{ | ||
"name": "shoukaku", | ||
"version": "3.2.3", | ||
"version": "3.3.0", | ||
"description": "A stable and updated wrapper around Lavalink", | ||
@@ -43,9 +43,9 @@ "main": "dist/index.js", | ||
"node-fetch": "^2.6.7", | ||
"ws": "^8.11.0" | ||
"ws": "^8.12.0" | ||
}, | ||
"devDependencies": { | ||
"@augu/eslint-config": "^3.0.0", | ||
"@types/node": "^18.11.17", | ||
"@types/node": "^18.11.18", | ||
"@types/node-fetch": "^2.6.2", | ||
"@types/ws": "^8.5.3", | ||
"@types/ws": "^8.5.4", | ||
"@typescript-eslint/eslint-plugin": "^5.36.1", | ||
@@ -56,5 +56,5 @@ "@typescript-eslint/parser": "^5.36.1", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.23", | ||
"typedoc": "^0.23.24", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
@@ -114,3 +114,4 @@ ## Shoukaku | ||
-------|----------|------------ | ||
..... | ........ | .......... | ||
Kazagumo | [Github](https://github.com/Takiyo0/Kazagumo) | A Shoukaku wrapper that have built-in queue system | ||
stone-deezer | [NPM](https://www.npmjs.com/package/stone-deezer) | A plugin to simplify deezer links and then play it from available sources (**REQUIRES [KAZAGUMO](https://github.com/Takiyo0/Kazagumo)**) | ||
@@ -137,2 +138,3 @@ ### Creating Plugins | ||
``` | ||
### Other Links | ||
@@ -139,0 +141,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
165011
2558
147
Updatedws@^8.12.0