From 9b1d0e72d0befdde96f440df98f2731c35425bca Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Sat, 8 May 2021 15:53:38 +0545 Subject: [PATCH] docs --- docs/faq/custom_filters.md | 11 +++++++++++ docs/faq/live_video.md | 10 ++++++++++ docs/faq/pause_resume.md | 13 +++++++++++++ docs/index.yml | 8 ++++++++ 4 files changed, 42 insertions(+) create mode 100644 docs/faq/custom_filters.md create mode 100644 docs/faq/live_video.md create mode 100644 docs/faq/pause_resume.md diff --git a/docs/faq/custom_filters.md b/docs/faq/custom_filters.md new file mode 100644 index 0000000..bf7dbda --- /dev/null +++ b/docs/faq/custom_filters.md @@ -0,0 +1,11 @@ +# 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 }); +``` \ No newline at end of file diff --git a/docs/faq/live_video.md b/docs/faq/live_video.md new file mode 100644 index 0000000..c8966b3 --- /dev/null +++ b/docs/faq/live_video.md @@ -0,0 +1,10 @@ +# 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! \ No newline at end of file diff --git a/docs/faq/pause_resume.md b/docs/faq/pause_resume.md new file mode 100644 index 0000000..6334d0a --- /dev/null +++ b/docs/faq/pause_resume.md @@ -0,0 +1,13 @@ +# 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); +``` \ No newline at end of file diff --git a/docs/index.yml b/docs/index.yml index f367636..3ab6cd4 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -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