# discord-easy-music

> A Module for Playing Music Very Easily

Latest version **3.0.2** (published 2021-09-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install discord-easy-music
pnpm add discord-easy-music
yarn add discord-easy-music
bun add discord-easy-music
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2021-09-25 |
| First published | 2021-09-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Author | dhvit |
| Maintainers | dhvit |
| Keywords | discord, music |

## Links

- npm: https://www.npmjs.com/package/discord-easy-music
- npm.io page: https://npm.io/package/discord-easy-music

## Dependencies (14)

- [ffmpeg](https://npm.io/package/ffmpeg.md) ^0.0.4
- [express](https://npm.io/package/express.md) ^4.17.1
- [mongoose](https://npm.io/package/mongoose.md) ^5.11.17
- [raw-body](https://npm.io/package/raw-body.md) ^2.4.1
- [scrape-yt](https://npm.io/package/scrape-yt.md) ^1.4.3
- [socket.io](https://npm.io/package/socket.io.md) ^4.2.0
- [ytdl-core](https://npm.io/package/ytdl-core.md) 4.9.1
- [discord.js](https://npm.io/package/discord.js.md) ^12.5.3
- [opusscript](https://npm.io/package/opusscript.md) ^0.0.8
- [ffmpeg-static](https://npm.io/package/ffmpeg-static.md) ^4.2.7
- [lyrics-finder](https://npm.io/package/lyrics-finder.md) ^21.4.0
- [express-session](https://npm.io/package/express-session.md) ^1.17.2
- [discord-ytdl-core](https://npm.io/package/discord-ytdl-core.md) ^5.0.4
- [ytdl-core-discord](https://npm.io/package/ytdl-core-discord.md) ^1.3.1

## Recent versions

- 3.0.2 (latest) — 2021-09-25
- 3.0.1 — 2021-09-25
- 3.0.0 — 2021-09-24
- 2.0.9 — 2021-09-24
- 2.0.8 — 2021-09-24
- 2.0.7 — 2021-09-23
- 2.0.6 — 2021-09-23
- 2.0.5 — 2021-09-23
- 2.0.4 — 2021-09-23
- 2.0.3 — 2021-09-23
- 2.0.2 — 2021-09-23
- 2.0.1 — 2021-09-23
- 2.0.0 — 2021-09-23
- 1.0.6-beta — 2021-09-23
- 1.0.5 — 2021-09-23
- … 6 more at https://npm.io/package/discord-easy-music/versions

## README

# Readme
This is a Music Package to make music bot work easily
# Requirements
Node JS Version 16 <br>
Discord JS Version 13 <br>
Opus Support 
# Creating Client
For Creating Client You have to use .Client Constructor Here is example - 
```js
  const Discord = require("discord.js");
const client = new Discord.Client( { intents: [
    'GUILDS',
    'GUILD_VOICE_STATES',
    'GUILD_MESSAGES'
]})
await client.login("Your bot token");
const musicm = require("discord-easy-music")
let music = await new musicm.Client(client, "!");
```
Replace `!` with Your Bot's Prefix and also Replace `Your bot token` with Your bot's Secret Token which you got from Developers Portal

## Functions
# Play 
```js
music.play(message)
```
It will play music automatically which user have given you just have to run this function whenever someone used `!play` <br>
<br>
**NOTE - The Prefix Given in Music Client should also match with used prefix in messageCreate Event**
# Stop
```js
music.stop(message)
```
For Stoppping the Playing Music

# Skip
```js
music.skip(message);
```
To Skip the Currently Playing Song

# Queue
```js
music.queue(message)
```
For Showing Which Music Will be played after Now Playing Music

# Volume
```js
music.volume(message)
```
For Changing Volume of the Music

# Lyrics
```js
music.lyrics(message)
```
For Getting Lyrics of Currently Playing Music

# Pause
```js
music.pause(message)
```
For Pausing The Current Playing Music

# Resume
```js
music.resume(message)
```
For Resuming the Paused Music

# Shuffle
```js
music.shuffle(message)
```
For Shuffling the Queue

# NowPlaying
```js
music.nowplaying(message)
```
For Showing that which Music is Currently Playing

# Full Example
```js
async function xd()
{
  const Discord = require("discord.js");
const client = new Discord.Client( { intents: [
    'GUILDS',
    'GUILD_VOICE_STATES',
    'GUILD_MESSAGES'
]})
await client.login("Your Bot Token");
const xd =  require("discord-easy-music")
let save = await new xd.Client(client, "!");

client.on("message", async(message) => {
    if(message.content.includes("!play"))
    {
        
        save.play(message);
        
    } 
    if(message.content.includes("!stop"))
    {
        save.stop(message);
    }
    if(message.content.includes("!resume"))
    {
        save.resume(message);
    }
    if(message.content.includes("!pause"))
    {
        save.pause(message);
    }
    if(message.content.includes("!lyrics"))
    {
        save.lyrics(message);
    }
    if(message.content.includes("!volume"))
    {
        save.volume(message);
    }
    if(message.content.includes("!queue"))
    {
        save.queue(message);
    }
    if(message.content.includes("!shuffle"))
    {
        save.shuffle(message);
    }
    if(message.content.includes("!np"))
    {
        save.nowplaying(message);
    }
})
}
xd();
```

---
_Source: https://npm.io/package/discord-easy-music · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
