Socket
Socket
Sign inDemoInstall

shoukaku

Package Overview
Dependencies
7
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

8

dist/package.json
{
"name": "shoukaku",
"version": "3.0.0",
"version": "3.0.1",
"description": "A lavalink wrapper that supports almost all libraries",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"compile": "tsc",
"build": "npm run compile && npm run build:docs",
"build": "tsc && npm run build:docs",
"build:docs": "typedoc --theme default --readme README.md --out docs/ --entryPointStrategy expand src/.",
"prepare": "tsc --outDir ./dist"
"prepare": "tsc"
},

@@ -12,0 +12,0 @@ "keywords": [

@@ -29,3 +29,2 @@ /// <reference types="node" />

* An instance of the Player class
* @readonly
*/

@@ -75,3 +74,2 @@ readonly player: Player;

* Cached serverUpdate event from Lavalink
* @private
*/

@@ -142,3 +140,3 @@ private serverUpdate;

* @param important Whether to prioritize sending this packet in the queue
* @private @internal
* @internal
*/

@@ -145,0 +143,0 @@ private send;

@@ -178,3 +178,3 @@ "use strict";

* @param important Whether to prioritize sending this packet in the queue
* @private @internal
* @internal
*/

@@ -181,0 +181,0 @@ send(data, important = false) {

@@ -227,3 +227,2 @@ /// <reference types="node" />

* Discort voice channel that this player is connected to
* @readonly
*/

@@ -364,3 +363,3 @@ readonly connection: Connection;

* Update all filters via the filters operation
* @private
* @internal
*/

@@ -370,2 +369,3 @@ private updateFilters;

* Remove all event listeners on this instance
* @internal
*/

@@ -372,0 +372,0 @@ clean(): void;

@@ -280,3 +280,3 @@ "use strict";

* Update all filters via the filters operation
* @private
* @internal
*/

@@ -302,2 +302,3 @@ updateFilters() {

* Remove all event listeners on this instance
* @internal
*/

@@ -304,0 +305,0 @@ clean() {

@@ -58,3 +58,2 @@ /// <reference types="node" />

* Shoukaku class
* @readonly
*/

@@ -84,3 +83,2 @@ readonly manager: Shoukaku;

* URL of Lavalink
* @readonly
*/

@@ -90,3 +88,2 @@ private readonly url;

* Credentials to access Lavalink
* @readonly
*/

@@ -126,3 +123,3 @@ private readonly auth;

* @returns Penalty score
* @static @internal @readonly
* @internal @readonly
*/

@@ -129,0 +126,0 @@ get penalties(): number;

@@ -44,3 +44,3 @@ "use strict";

* @returns Penalty score
* @static @internal @readonly
* @internal @readonly
*/

@@ -47,0 +47,0 @@ get penalties() {

@@ -9,3 +9,2 @@ import { Node } from './Node';

* Node that initalized this message queue
* @readonly
*/

@@ -15,3 +14,2 @@ private readonly node;

* Pending messages
* @readonly
*/

@@ -18,0 +16,0 @@ readonly pending: string[];

@@ -48,3 +48,2 @@ import { Node } from './Node';

* Wrapper around Lavalink REST API
* @internal
*/

@@ -54,3 +53,2 @@ export declare class Rest {

* Node that initialized this instance
* @readonly
*/

@@ -79,3 +77,2 @@ private readonly node;

* @returns A promise that resolves to a Lavalink response or void
* @internal
*/

@@ -87,3 +84,2 @@ resolve(identifier: string): Promise<LavalinkResponse | void>;

* @returns Promise that resolves to a track or void
* @internal
*/

@@ -100,2 +96,3 @@ decode(track: string): Promise<Track | void>;

* @param address IP address
* @internal
*/

@@ -107,2 +104,3 @@ unmarkFailedAddress(address: string): Promise<void>;

* @param fetchOptions.options Options passed to petitio
* @internal
*/

@@ -109,0 +107,0 @@ private fetch;

@@ -10,3 +10,2 @@ "use strict";

* Wrapper around Lavalink REST API
* @internal
*/

@@ -31,3 +30,2 @@ class Rest {

* @returns A promise that resolves to a Lavalink response or void
* @internal
*/

@@ -45,3 +43,2 @@ resolve(identifier) {

* @returns Promise that resolves to a track or void
* @internal
*/

@@ -70,2 +67,3 @@ decode(track) {

* @param address IP address
* @internal
*/

@@ -87,2 +85,3 @@ unmarkFailedAddress(address) {

* @param fetchOptions.options Options passed to petitio
* @internal
*/

@@ -89,0 +88,0 @@ async fetch(fetchOptions) {

@@ -9,21 +9,69 @@ /// <reference types="node" />

export interface Structures {
/**
* A custom structure that extends the Rest class
*/
rest?: Constructor<Rest>;
/**
* A custom structure that extends the Player class
*/
player?: Constructor<Player>;
}
export interface NodeOption {
/**
* Name of this node
*/
name: string;
/**
* URL of Lavalink
*/
url: string;
/**
* Credentials to access Lavalnk
*/
auth: string;
/**
* Whether to use secure protocols or not
*/
secure?: boolean;
/**
* Group of this node
*/
group?: string;
}
export interface ShoukakuOptions {
/**
* Whether to resume a connection on disconnect to Lavalink
*/
resume?: boolean;
/**
* Resume key for Lavalink
*/
resumeKey?: string;
/**
* Timeout before resuming a connection
*/
resumeTimeout?: number;
/**
* Number of times to try and reconnect to Lavalink before giving up
*/
reconnectTries?: number;
/**
* Timeout before trying to reconnect
*/
reconnectInterval?: number;
/**
* Time to wait for a response from the Lavalink REST API before giving up
*/
restTimeout?: number;
/**
* Whether to move players to a different Lavalink node when a node disconnects
*/
moveOnDisconnect?: boolean;
/**
* User Agent to use when making requests to Lavalink
*/
userAgent?: string;
/**
* Custom structures for shoukaku to use
*/
structures?: Structures;

@@ -85,3 +133,2 @@ }

* Discord library connector
* @readonly
*/

@@ -91,3 +138,2 @@ readonly connector: Connector;

* Shoukaku options
* @readonly
*/

@@ -97,3 +143,2 @@ readonly options: MergedShoukakuOptions;

* Connected Lavalink nodes
* @readonly
*/

@@ -122,3 +167,3 @@ readonly nodes: Map<string, Node>;

* @returns A map of guild IDs and players
* @static
* @readonly
*/

@@ -125,0 +170,0 @@ get players(): Map<string, Player>;

@@ -36,3 +36,3 @@ "use strict";

* @returns A map of guild IDs and players
* @static
* @readonly
*/

@@ -39,0 +39,0 @@ get players() {

{
"name": "shoukaku",
"version": "3.0.0",
"version": "3.0.1",
"description": "A lavalink wrapper that supports almost all libraries",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"compile": "tsc",
"build": "npm run compile && npm run build:docs",
"build": "tsc && npm run build:docs",
"build:docs": "typedoc --theme default --readme README.md --out docs/ --entryPointStrategy expand src/.",
"prepare": "tsc --outDir ./dist"
"prepare": "tsc"
},

@@ -12,0 +12,0 @@ "keywords": [

@@ -33,2 +33,6 @@ ## Shoukaku

### Documentation
https://deivu.github.io/Shoukaku/
### Small code snippet examples

@@ -35,0 +39,0 @@ > Initializing the library (Using Connector Discord.JS)

@@ -32,3 +32,2 @@ import { EventEmitter, once } from 'events';

* An instance of the Player class
* @readonly
*/

@@ -78,3 +77,2 @@ public readonly player: Player;

* Cached serverUpdate event from Lavalink
* @private
*/

@@ -250,3 +248,3 @@ private serverUpdate: ServerUpdate|null;

* @param important Whether to prioritize sending this packet in the queue
* @private @internal
* @internal
*/

@@ -253,0 +251,0 @@ private send(data: any, important = false): void {

@@ -263,3 +263,2 @@ import { EventEmitter } from 'events';

* Discort voice channel that this player is connected to
* @readonly
*/

@@ -535,3 +534,3 @@ public readonly connection: Connection;

* Update all filters via the filters operation
* @private
* @internal
*/

@@ -558,2 +557,3 @@ private updateFilters(): void {

* Remove all event listeners on this instance
* @internal
*/

@@ -560,0 +560,0 @@ public clean(): void {

@@ -63,3 +63,2 @@ import { EventEmitter } from 'events';

* Shoukaku class
* @readonly
*/

@@ -89,3 +88,2 @@ public readonly manager: Shoukaku;

* URL of Lavalink
* @readonly
*/

@@ -95,3 +93,2 @@ private readonly url: string;

* Credentials to access Lavalink
* @readonly
*/

@@ -147,3 +144,3 @@ private readonly auth: string;

* @returns Penalty score
* @static @internal @readonly
* @internal @readonly
*/

@@ -150,0 +147,0 @@ get penalties(): number {

@@ -11,3 +11,2 @@ import Websocket from 'ws';

* Node that initalized this message queue
* @readonly
*/

@@ -17,3 +16,2 @@ private readonly node: Node;

* Pending messages
* @readonly
*/

@@ -20,0 +18,0 @@ public readonly pending: string[];

@@ -60,3 +60,2 @@ import { Node } from './Node';

* Wrapper around Lavalink REST API
* @internal
*/

@@ -66,3 +65,2 @@ export class Rest {

* Node that initialized this instance
* @readonly
*/

@@ -96,3 +94,2 @@ private readonly node: Node;

* @returns A promise that resolves to a Lavalink response or void
* @internal
*/

@@ -111,3 +108,2 @@ public resolve(identifier: string): Promise<LavalinkResponse|void> {

* @returns Promise that resolves to a track or void
* @internal
*/

@@ -138,2 +134,3 @@ public decode(track: string): Promise<Track|void> {

* @param address IP address
* @internal
*/

@@ -156,2 +153,3 @@ public unmarkFailedAddress(address: string): Promise<void> {

* @param fetchOptions.options Options passed to petitio
* @internal
*/

@@ -158,0 +156,0 @@ private async fetch(fetchOptions: FetchOptions): Promise<any|void> {

@@ -10,3 +10,9 @@ import { EventEmitter } from 'events';

export interface Structures {
/**
* A custom structure that extends the Rest class
*/
rest?: Constructor<Rest>;
/**
* A custom structure that extends the Player class
*/
player?: Constructor<Player>;

@@ -16,6 +22,21 @@ }

export interface NodeOption {
/**
* Name of this node
*/
name: string;
/**
* URL of Lavalink
*/
url: string;
/**
* Credentials to access Lavalnk
*/
auth: string;
/**
* Whether to use secure protocols or not
*/
secure?: boolean;
/**
* Group of this node
*/
group?: string;

@@ -25,10 +46,37 @@ }

export interface ShoukakuOptions {
/**
* Whether to resume a connection on disconnect to Lavalink
*/
resume?: boolean;
/**
* Resume key for Lavalink
*/
resumeKey?: string;
/**
* Timeout before resuming a connection
*/
resumeTimeout?: number;
/**
* Number of times to try and reconnect to Lavalink before giving up
*/
reconnectTries?: number;
/**
* Timeout before trying to reconnect
*/
reconnectInterval?: number;
/**
* Time to wait for a response from the Lavalink REST API before giving up
*/
restTimeout?: number;
/**
* Whether to move players to a different Lavalink node when a node disconnects
*/
moveOnDisconnect?: boolean;
/**
* User Agent to use when making requests to Lavalink
*/
userAgent?: string;
/**
* Custom structures for shoukaku to use
*/
structures?: Structures;

@@ -93,3 +141,2 @@ }

* Discord library connector
* @readonly
*/

@@ -99,3 +146,2 @@ public readonly connector: Connector;

* Shoukaku options
* @readonly
*/

@@ -105,3 +151,2 @@ public readonly options: MergedShoukakuOptions;

* Connected Lavalink nodes
* @readonly
*/

@@ -138,3 +183,3 @@ public readonly nodes: Map<string, Node>;

* @returns A map of guild IDs and players
* @static
* @readonly
*/

@@ -141,0 +186,0 @@ get players(): Map<string, Player> {

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc