Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shoukaku

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shoukaku - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

25

index.d.ts

@@ -1,10 +0,29 @@

// idfk what this is lmao
import { Shoukaku } from './types/Shoukaku';
import { Utils } from './types/Utils';
import { ShoukakuConnection } from './types/guild/ShoukakuConnection';
import { ShoukakuPlayer } from './types/guild/ShoukakuPlayer';
import { ShoukakuRest } from './types/node/ShoukakuRest';
import { ShoukakuSocket } from './types/node/ShoukakuSocket';
import { ShoukakuFilter } from './types/struct/ShoukakuFilter';
import { ShoukakuStats } from './types/struct/ShoukakuStats';
import { Shoukaku } from './types/Shoukaku';
import * as Constants from './types/Constants';
import * as Libraries from './types/libraries/Libraries';
import { version } from './package.json'
declare module 'shoukaku' {
export { Shoukaku, Constants, Libraries, version };
export {
Shoukaku,
Utils,
ShoukakuConnection,
ShoukakuPlayer,
ShoukakuRest,
ShoukakuSocket,
ShoukakuFilter,
ShoukakuStats,
Constants,
Libraries,
version
};
}
module.exports = {
Shoukaku: require('./src/Shoukaku.js'),
Utils: require('./src/Utils.js'),
ShoukakuConnection: require('./src/guild/ShoukakuConnection.js'),
ShoukakuPlayer: require('./src/guild/ShoukakuPlayer.js'),
ShoukakuRest: require('./src/node/ShoukakuRest.js'),
ShoukakuSocket: require('./src/node/ShoukakuSocket.js'),
ShoukakuFilter: require('./src/struct/ShoukakuFilter.js'),
ShoukakuStats: require('./src/struct/ShoukakuStats.js'),
ShoukakuTrack: require('./src/struct/ShoukakuTrack.js'),
ShoukakuTrackList: require('./src/struct/ShoukakuTrackList.js'),
Constants: require('./src/Constants.js'),

@@ -4,0 +13,0 @@ Libraries: require('./src/libraries/Libraries.js'),

2

package.json
{
"name": "shoukaku",
"version": "2.0.3",
"version": "2.0.4",
"description": "A lavalink wrapper that supports almost all libraries",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -129,3 +129,3 @@ const EventEmitter = require('events');

* @param {string|ShoukakuTrack} track The Base64 track from the Lavalink Rest API or a ShoukakuTrack
* @param {Object} [options={}] Used if you want to put a custom track start or end time
* @param {Object} [options={}] Optional arguments to pass
* @param {boolean} [options.noReplace=true] Specifies if the player will not replace the current track when executing this action

@@ -138,3 +138,3 @@ * @param {boolean} [options.pause=false] If `true`, the player will pause when the track starts playing

*/
playTrack(input, options = { }) {
playTrack(input, options = {}) {
if (!input) throw new Error('No track given to play');

@@ -368,2 +368,7 @@ if (input instanceof ShoukakuTrack) input = input.track;

* @memberOf ShoukakuPlayer
* @param {Object} [options={}] Optional arguments for playTrack to process
* @param {boolean} [options.noReplace=true] Specifies if the player will not replace the current track when executing this action
* @param {boolean} [options.pause] If `true`, the player will pause when the track starts playing
* @param {number} [options.startTime] In milliseconds on when to start
* @param {number} [options.endTime] In milliseconds on when to end
* @returns {ShoukakuPlayer}

@@ -376,5 +381,9 @@ * @example

*/
resume() {
resume(options = {}) {
this.updateFilters();
if (this.track) this.playTrack(this.track, { startTime: this.position, pause: this.paused });
if (this.track) {
options = mergeDefault({ startTime: this.position, pause: this.paused }, options);
this.playTrack(this.track, options);
}
this.emit('resumed');

@@ -381,0 +390,0 @@ return this;

const ShoukakuTrack = require('./ShoukakuTrack.js');
const Types = { PLAYLIST_LOADED: 'PLAYLIST', TRACK_LOADED: 'TRACK', SEARCH_RESULT: 'SEARCH', NO_MATCHES: "NO_MATCHES", LOAD_FAILED: "LOAD_FAILED" };
const Types = { PLAYLIST_LOADED: 'PLAYLIST', TRACK_LOADED: 'TRACK', SEARCH_RESULT: 'SEARCH', NO_MATCHES: 'NO_MATCHES', LOAD_FAILED: 'LOAD_FAILED' };
/**

@@ -4,0 +4,0 @@ * Represents a list track resolved from lavalink's rest

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

public clearFilters(): ShoukakuPlayer;
public resume(): ShoukakuPlayer;
public resume(options?: { noReplace?: boolean, pause?: boolean, startTime?: number, endTime?: number }): ShoukakuPlayer;
private updateFilters(): void;

@@ -39,0 +39,0 @@ protected clean(): void;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc