Merge branch 'master' into v5

This commit is contained in:
MegaPixel 2021-06-13 23:32:06 +05:45 committed by GitHub
commit f1356f6d08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 57 additions and 10 deletions

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
* text=auto eol=lf

View file

@ -25,7 +25,7 @@ Steps to reproduce the behavior:
**Please complete the following information:**
- Node Version: [x.x.x]
- Library Version: [x.x.x]
- Discord Player Version: [x.x.x]
- Discord.js Version: [x.x.x]
**Additional context**

View file

@ -0,0 +1,12 @@
# How to add custom audio filters?
Audio filters in **Discord Player** are **[FFmpeg audio filters](http://ffmpeg.org/ffmpeg-all.html#Audio-Filters)**. You can add your own audio filter like this:
```js
const { AudioFilters } = require("discord-player");
AudioFilters.define("3D", "apulsator=hz=0.128");
// later, it can be used like this
player.setFilters(message, { "3D": true });
```

11
docs/faq/live_video.md Normal file
View file

@ -0,0 +1,11 @@
# How to play live videos?
You cannot play live videos by default. If you need to play the live video, just add this option:
```js
const player = new Player(client, {
enableLive: true // enables livestream
});
```
However, you cannot use audio filters with livestreams using this library!

15
docs/faq/pause_resume.md Normal file
View file

@ -0,0 +1,15 @@
# Pause and Resume is not working properly
This is a bug in **[discord.js#5300](https://github.com/discordjs/discord.js/issues/5300)**.
# Fix
You have to update your command something like this:
```diff
- client.player.resume(message);
+ client.player.resume(message);
+ client.player.pause(message);
+ client.player.resume(message);
```

View file

@ -6,6 +6,14 @@
files:
- name: Extractors API
path: extractor.md
- name: FAQ
files:
- name: Custom Filters
path: custom_filters.md
- name: Livestreams
path: live_video.md
- name: Pause & Resume
path: pause_resume.md
- name: YouTube
files:
- name: Using Cookies

View file

@ -48,7 +48,7 @@
"bugs": {
"url": "https://github.com/Androz2091/discord-player/issues"
},
"homepage": "https://github.com/Androz2091/discord-player#readme",
"homepage": "https://discord-player.js.org",
"dependencies": {
"@discordjs/voice": "^0.3.1",
"discord-ytdl-core": "^5.0.3",
@ -63,7 +63,7 @@
"@babel/core": "^7.13.16",
"@babel/preset-env": "^7.13.15",
"@babel/preset-typescript": "^7.13.0",
"@discord-player/extractor": "^2.0.0",
"@discord-player/extractor": "^3.0.0",
"@discordjs/opus": "^0.5.0",
"@types/node": "^14.14.41",
"@types/ws": "^7.4.1",