# discord-youtube-player

> Discord Youtube Player a music player based on discord.js

Latest version **1.1.2** (published 2021-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install discord-youtube-player
pnpm add discord-youtube-player
yarn add discord-youtube-player
bun add discord-youtube-player
```

## 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 | 1.1.2 |
| Published | 2021-01-15 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 35.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | notadevps |
| Keywords | discord, discord-music-player, discord-youtube-player, music, discord-music, youtube-music |

## Links

- npm: https://www.npmjs.com/package/discord-youtube-player
- Repository: https://github.com/notadevps/discord-youtube-player
- Homepage: https://github.com/notadevps/discord-youtube-player#readme
- Issues: https://github.com/notadevps/discord-youtube-player/issues
- npm.io page: https://npm.io/package/discord-youtube-player

## Dependencies (6)

- [events](https://npm.io/package/events.md) ^3.2.0
- [stream](https://npm.io/package/stream.md) 0.0.2
- [yt-search](https://npm.io/package/yt-search.md) ^2.5.1
- [ytdl-core](https://npm.io/package/ytdl-core.md) ^4.4.3
- [discord.js](https://npm.io/package/discord.js.md) ^12.5.1
- [discord-ytdl-core](https://npm.io/package/discord-ytdl-core.md) ^5.0.0

## Recent versions

- 1.1.2 (latest) — 2021-01-15
- 1.1.1 — 2021-01-14
- 1.0.9 — 2021-01-14
- 1.0.8 — 2021-01-14
- 1.0.6 — 2021-01-13
- 1.0.2 — 2021-01-13

## README

Discord Music Player
a music player based on [discord.js](https://discord.js.org/#/)\
with typescript support and all types of filters

Documentation available [link](https://discord-youtube-player.github.io/)


# Quickstart
do install [ffmpeg](https://www.npmjs.com/package/ffmpeg) , [ffmpeg-static](https://www.npmjs.com/package/ffmpeg-static)  and [opus](https://www.npmjs.com/package/@discordjs/opus)

make a file in an IDE of your choice
you can start with
```
const discord = require('discord.js');
const client = new discord.Client();
const { Player } = require ('discord-music-player');
const player = new Player(client, { autoSelfDeaf: true });
```

# Events 
```
queueCreated -> when a queue is created
trackEnded -> when a track is ended
queueEnded -> when ther is no tracks to play 
trackAdded -> when a  track is added in queue
error -> error occured
```

# EXAMPLE
```
player.on('trackEnded', (q, msg) => {
    return msg.channel.send('track ended');
})

player.on('trackAdded' , (q, msg, track) => {
    return msg.channel.send('track added');
})

player.on('error', (e) => {
    return msg.channel.send('error occured ' + e);
})

player.on('queueCreated', (q, msg) => {
    return msg.channel.send('queueCreated');
})

player.on('queueEnded' , (q, msg) => {
    return msg.channel.send('queueCreated');
})

```

discord bot example [LINK](https://github.com/notadevps/discord-youtube-player/tree/main/example)\
for more info join our support server  [LINK](https://discord.gg/mwAXpMD)

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