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

discord-player

Package Overview
Dependencies
Maintainers
1
Versions
359
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-player - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "discord-player",
"version": "1.0.6",
"version": "1.0.7",
"description": "Complete framework to facilitate music commands using discord.js v12",

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

@@ -64,2 +64,4 @@ # Discord Player

client.player.getQueue(guildID);
// Skip the current song
client.player.skip(guildID);
// Pause

@@ -118,3 +120,3 @@ client.player.pause(guildID);

To pause the current song, use the `client.manager.pause()` function.
To pause the current song, use the `client.player.pause()` function.

@@ -145,3 +147,3 @@ **Usage:**

To resume the current song, use the `client.manager.resume()` function.
To resume the current song, use the `client.player.resume()` function.

@@ -172,3 +174,3 @@ **Usage:**

To stop the music, use the `client.manager.stop()` function.
To stop the music, use the `client.player.stop()` function.

@@ -199,3 +201,3 @@ **Usage:**

To update the volume, use the `client.manager.setVolume()` function.
To update the volume, use the `client.player.setVolume()` function.

@@ -325,2 +327,28 @@ **Usage:**

### Skip
To skip the current song, use the `client.player.skip()` function.
**Usage:**
```js
client.player.skip(guildID);
```
**Example**:
```js
client.on('message', async (message) => {
const args = message.content.slice(settings.prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
if(command === 'skip'){
let song = await client.player.skip(message.guild.id);
message.channel.send(`${song} skipped!`);
}
});
```
## Info Messages

@@ -327,0 +355,0 @@

@@ -226,3 +226,3 @@ const ytdl = require('ytdl-core');

* @param {string} guildID
* @returns {Promise<Queue>}
* @returns {Promise<Song>}
*/

@@ -234,7 +234,8 @@ skip(guildID){

if(!queue) reject('Not playing');
let currentSong = queue.songs[0];
// Ends the dispatcher
queue.dispatcher.end();
queue.skipped = true;
// Resolves guild queue
resolve(queue);
// Resolves the current song
resolve(currentSong);
});

@@ -241,0 +242,0 @@ }

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