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:** **Please complete the following information:**
- Node Version: [x.x.x] - Node Version: [x.x.x]
- Library Version: [x.x.x] - Discord Player Version: [x.x.x]
- Discord.js Version: [x.x.x] - Discord.js Version: [x.x.x]
**Additional context** **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: files:
- name: Extractors API - name: Extractors API
path: extractor.md 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 - name: YouTube
files: files:
- name: Using Cookies - name: Using Cookies

View file

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

View file

@ -268,4 +268,4 @@ class DiscordPlayer extends EventEmitter<PlayerEvents> {
} }
} }
export { DiscordPlayer as Player }; export { DiscordPlayer as Player };

View file

@ -213,4 +213,4 @@ class Queue<T = unknown> {
} }
} }
export { Queue }; export { Queue };

View file

@ -173,4 +173,4 @@ class Track {
export default Track; export default Track;
export { Track }; export { Track };

View file

@ -205,4 +205,4 @@ export interface PlaylistJSON {
url: string; url: string;
}; };
tracks: TrackJSON[]; tracks: TrackJSON[];
} }

View file

@ -1 +1 @@
export {}; export {};

View file

@ -41,4 +41,4 @@ class Util {
} }
} }
export { Util }; export { Util };

View file

@ -4515,4 +4515,4 @@ ytdl-core@^4.8.2:
dependencies: dependencies:
m3u8stream "^0.8.3" m3u8stream "^0.8.3"
miniget "^4.0.0" miniget "^4.0.0"
sax "^1.1.3" sax "^1.1.3"