[Docs] Audio Cog Guide (#5871)

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
This commit is contained in:
Kreusada 2022-10-31 01:43:19 +00:00 committed by GitHub
parent 236d30f335
commit 236a10c464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 3775 additions and 14 deletions

3
.github/labeler.yml vendored
View File

@ -10,7 +10,10 @@
- docs/cog_guides/alias.rst - docs/cog_guides/alias.rst
"Category: Audio Cog": "Category: Audio Cog":
- any: - any:
# Source
- redbot/cogs/audio/**/* - redbot/cogs/audio/**/*
# Docs
- docs/cog_guides/audio.rst
all: all:
- "!redbot/cogs/audio/**/locales/*" - "!redbot/cogs/audio/**/locales/*"
"Category: Bank API": "Category: Bank API":

View File

@ -423,7 +423,7 @@ Audio
***** *****
- Age-restricted tracks, live streams, and mix playlists from YouTube should work in Audio again (:issue:`3791`) - Age-restricted tracks, live streams, and mix playlists from YouTube should work in Audio again (:issue:`3791`)
- Soundcloud's sets and playlists with more than 50 tracks should work in Audio again (:issue:`3791`) - SoundCloud sets and playlists with more than 50 tracks should work in Audio again (:issue:`3791`)
CustomCommands CustomCommands
************** **************

View File

@ -226,7 +226,7 @@ Audio
- Enabled JDA-NAS on all system architectures which should limit stuttering/buffering issues on some machines (:issue:`5474`) - Enabled JDA-NAS on all system architectures which should limit stuttering/buffering issues on some machines (:issue:`5474`)
- The bot will now disconnect from the voice channel when all members are bots if the auto-disconnect setting is enabled (:issue:`5421`) - The bot will now disconnect from the voice channel when all members are bots if the auto-disconnect setting is enabled (:issue:`5421`)
- Fixed an issue with resuming playback after changing voice channels (:issue:`5170`) - Fixed an issue with resuming playback after changing voice channels (:issue:`5170`)
- Fixed issues with Soundcloud private playlists and mobile links (:issue:`5474`) - Fixed issues with SoundCloud private playlists and mobile links (:issue:`5474`)
- Fixed searching music with some of the queries containing quotes or backslashes (:issue:`5474`) - Fixed searching music with some of the queries containing quotes or backslashes (:issue:`5474`)
- Fixed an exception caused by unavailable YT tracks in Mix playlists (:issue:`5474`) - Fixed an exception caused by unavailable YT tracks in Mix playlists (:issue:`5474`)
- Fixed ``IndexError`` in ``[p]queue`` command which occurred when the user provides negative integer as the page number (:issue:`5429`) - Fixed ``IndexError`` in ``[p]queue`` command which occurred when the user provides negative integer as the page number (:issue:`5429`)
@ -576,7 +576,7 @@ Audio
- The cog will now check whether it has speak permissions in the channel before performing any actions (:issue:`5012`) - The cog will now check whether it has speak permissions in the channel before performing any actions (:issue:`5012`)
- Fixed an issue with Audio failing when it's missing permissions to send a message in the notification channel (:issue:`4960`) - Fixed an issue with Audio failing when it's missing permissions to send a message in the notification channel (:issue:`4960`)
- Fixed fetching of age-restricted tracks (:issue:`5085`) - Fixed fetching of age-restricted tracks (:issue:`5085`)
- Fixed an issue with Soundcloud URLs that ended with a slash (``/``) character (:issue:`5085`) - Fixed an issue with SoundCloud URLs that ended with a slash (``/``) character (:issue:`5085`)
Custom Commands Custom Commands
*************** ***************
@ -1046,7 +1046,7 @@ Audio
***** *****
- Fixed ``[p]llset java`` failing to set the Java executable path (:issue:`4621`, :issue:`4624`) - Fixed ``[p]llset java`` failing to set the Java executable path (:issue:`4621`, :issue:`4624`)
- Fixed Soundcloud playback (:issue:`4683`) - Fixed SoundCloud playback (:issue:`4683`)
- Fixed YouTube age-restricted track playback (:issue:`4683`) - Fixed YouTube age-restricted track playback (:issue:`4683`)
- Added more friendly messages for 429 errors to let users know they have been temporarily banned from accessing the service instead of a generic Lavalink error (:issue:`4683`) - Added more friendly messages for 429 errors to let users know they have been temporarily banned from accessing the service instead of a generic Lavalink error (:issue:`4683`)
- Environment information will now be appended to Lavalink tracebacks in the spring.log (:issue:`4683`) - Environment information will now be appended to Lavalink tracebacks in the spring.log (:issue:`4683`)

3757
docs/cog_guides/audio.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@ Welcome to Red - Discord Bot's documentation!
intents intents
cog_guides/admin cog_guides/admin
cog_guides/alias cog_guides/alias
cog_guides/audio
cog_guides/cleanup cog_guides/cleanup
cog_guides/cog_manager_ui cog_guides/cog_manager_ui
cog_guides/core cog_guides/core

View File

@ -66,7 +66,7 @@ Manually installing dependencies
.. attention:: Please choose the option to "Git from the command line and also from 3rd-party software" in Git's setup. .. attention:: Please choose the option to "Git from the command line and also from 3rd-party software" in Git's setup.
* `Java 11 <https://adoptium.net/?variant=openjdk11>`_ - needed for Audio * `Java 11 <https://adoptium.net/temurin/releases/?version=11>`_ - needed for Audio
From here, continue onto `creating-venv-windows`. From here, continue onto `creating-venv-windows`.

View File

@ -25,7 +25,7 @@
.. |role-input| replace:: Please give **the exact role name or ID**, or it won't be detected. .. |role-input| replace:: Please give **the exact role name or ID**, or it won't be detected.
.. |role-input-quotes| replace:: Please give **the exact role name or ID**, or it won't be detected. .. |role-input-quotes| replace:: Please give **the exact role name or ID**, or it won't be detected.
If the role name has spaces, provide it enclosed in quotes like this: ``"my role with spaces"`` If the role name has spaces, provide it enclosed in quotes like this: ``"my role with spaces"``.
.. |member-input| replace:: You can either mention the member, provide their ID, their exact name with .. |member-input| replace:: You can either mention the member, provide their ID, their exact name with
the tag or not, or their nickname. the tag or not, or their nickname.
@ -51,4 +51,4 @@
.. These are the comments for parameter types such as `bool`. .. These are the comments for parameter types such as `bool`.
.. |bool-input| replace:: You should provide either 'true' or 'false'. .. |bool-input| replace:: You should provide either 'true' or 'false'.

View File

@ -152,7 +152,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
), ),
) )
@command_llsetup.command(name="external") @command_llsetup.command(name="external", aliases=["unmanaged"])
async def command_llsetup_external(self, ctx: commands.Context): async def command_llsetup_external(self, ctx: commands.Context):
"""Toggle using external Lavalink nodes - requires an existing external Lavalink node for Audio to work, if enabled. """Toggle using external Lavalink nodes - requires an existing external Lavalink node for Audio to work, if enabled.
@ -457,7 +457,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
async def command_llsetup_config_source_http(self, ctx: commands.Context): async def command_llsetup_config_source_http(self, ctx: commands.Context):
"""Toggle HTTP direct URL usage on or off. """Toggle HTTP direct URL usage on or off.
This source is used to allow playback from direct http streams (This does not affect direct url playback for the other sources) This source is used to allow playback from direct HTTP streams (this does not affect direct URL playback for the other sources).
""" """
state = await self.config.yaml.lavalink.server.sources.http() state = await self.config.yaml.lavalink.server.sources.http()
await self.config.yaml.lavalink.server.sources.http.set(not state) await self.config.yaml.lavalink.server.sources.http.set(not state)
@ -538,7 +538,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
async def command_llsetup_config_source_soundcloud(self, ctx: commands.Context): async def command_llsetup_config_source_soundcloud(self, ctx: commands.Context):
"""Toggle Soundcloud source on or off. """Toggle Soundcloud source on or off.
This toggle controls the playback of all Soundcloud related content. This toggle controls the playback of all SoundCloud related content.
""" """
state = await self.config.yaml.lavalink.server.sources.soundcloud() state = await self.config.yaml.lavalink.server.sources.soundcloud()
await self.config.yaml.lavalink.server.sources.soundcloud.set(not state) await self.config.yaml.lavalink.server.sources.soundcloud.set(not state)

View File

@ -52,7 +52,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
Editable by bot owner, guild owner, guild admins, guild mods, DJ role and playlist creator. Editable by bot owner, guild owner, guild admins, guild mods, DJ role and playlist creator.
**User**: **User**:
Visible to all bot users, if --author is passed. Visible to all bot users, if --author is passed.
Editable by bot owner and creator. Editable by bot owner and the playlist creator.
""" """
@command_playlist.command( @command_playlist.command(

View File

@ -133,9 +133,9 @@ DANGEROUS_COMMANDS = {
"disabling this will make the bot unable to play any local track content." "disabling this will make the bot unable to play any local track content."
), ),
"command_llsetup_config_source_soundcloud": _( "command_llsetup_config_source_soundcloud": _(
"This command toggles the support of Soundcloud playback. " "This command toggles the support of SoundCloud playback. "
"An example is <https://soundcloud.com/user-103858850/tilla>; " "An example is <https://soundcloud.com/user-103858850/tilla>; "
"disabling this will make the bot unable to play any Soundcloud content." "disabling this will make the bot unable to play any SoundCloud content."
), ),
"command_llsetup_config_source_youtube": _( "command_llsetup_config_source_youtube": _(
"This command toggles the support of YouTube playback (Spotify depends on YouTube). " "This command toggles the support of YouTube playback (Spotify depends on YouTube). "

View File

@ -435,7 +435,7 @@ class PlayerUtilities(MixinMeta, metaclass=CompositeMetaClass):
# a list of Tracks where all should be enqueued # a list of Tracks where all should be enqueued
# this is a Spotify playlist already made into a list of Tracks or a # this is a Spotify playlist already made into a list of Tracks or a
# url where Lavalink handles providing all Track objects to use, like a # url where Lavalink handles providing all Track objects to use, like a
# YouTube or Soundcloud playlist # YouTube or SoundCloud playlist
if len(player.queue) >= 10000: if len(player.queue) >= 10000:
return await self.send_embed_msg(ctx, title=_("Queue size limit reached.")) return await self.send_embed_msg(ctx, title=_("Queue size limit reached."))
track_len = 0 track_len = 0