[Audio] Add backticks to commands in docstrings, fix GH-3140 (#3374)

* docstring change

* remove backticks

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* Seems like i cant read

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* Rename 3140.enchance.1.rst to 3140.enhance.1.rst
This commit is contained in:
Draper 2020-01-17 21:30:29 +00:00 committed by jack1142
parent 48ccd9070c
commit 3d1e6eab00
2 changed files with 76 additions and 80 deletions

View File

@ -0,0 +1 @@
Update the help strings for ``[p]audioset emptydisconnect``.

View File

@ -696,7 +696,7 @@ class Audio(commands.Cog):
async def dc(self, ctx: commands.Context):
"""Toggle the bot auto-disconnecting when done playing.
This setting takes precedence over [p]audioset emptydisconnect.
This setting takes precedence over `[p]audioset emptydisconnect`.
"""
disconnect = await self.config.guild(ctx.guild).disconnect()
@ -1123,7 +1123,7 @@ class Audio(commands.Cog):
"""Set a playlist to auto-play songs from.
**Usage**:
[p]audioset autoplay playlist_name_OR_id args
`[p]audioset autoplay playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -1146,9 +1146,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]audioset autoplay MyGuildPlaylist
[p]audioset autoplay MyGlobalPlaylist --scope Global
[p]audioset autoplay PersonalPlaylist --scope User --author Draper
`[p]audioset autoplay MyGuildPlaylist`
`[p]audioset autoplay MyGlobalPlaylist --scope Global`
`[p]audioset autoplay PersonalPlaylist --scope User --author Draper`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -1259,7 +1259,10 @@ class Audio(commands.Cog):
@audioset.command()
@checks.mod_or_permissions(administrator=True)
async def emptydisconnect(self, ctx: commands.Context, seconds: int):
"""Auto-disconnect from channel when bot is alone in it for x seconds, 0 to disable."""
"""Auto-disconnect from channel when bot is alone in it for x seconds, 0 to disable.
`[p]audioset dc` takes precedence over this setting.
"""
if seconds < 0:
return await self._embed_msg(
ctx, title=_("Invalid Time"), description=_("Seconds can't be less than zero.")
@ -4002,7 +4005,7 @@ class Audio(commands.Cog):
The track(s) will be appended to the end of the playlist.
**Usage**:
[p]playlist append playlist_name_OR_id track_name_OR_url args
`[p]playlist append playlist_name_OR_id track_name_OR_url [args]`
**Args**:
The following are all optional:
@ -4025,10 +4028,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist append MyGuildPlaylist Hello by Adele
[p]playlist append MyGlobalPlaylist Hello by Adele --scope Global
[p]playlist append MyGlobalPlaylist Hello by Adele --scope Global
--Author Draper#6666
`[p]playlist append MyGuildPlaylist Hello by Adele`
`[p]playlist append MyGlobalPlaylist Hello by Adele --scope Global`
`[p]playlist append MyGlobalPlaylist Hello by Adele --scope Global --Author Draper#6666`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -4163,7 +4165,7 @@ class Audio(commands.Cog):
"""Copy a playlist from one scope to another.
**Usage**:
[p]playlist copy playlist_name_OR_id args
`[p]playlist copy playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -4190,11 +4192,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist copy MyGuildPlaylist --from-scope Guild --to-scope Global
[p]playlist copy MyGlobalPlaylist --from-scope Global --to-author Draper#6666
--to-scope User
[p]playlist copy MyPersonalPlaylist --from-scope user --to-author Draper#6666
--to-scope Guild --to-guild Red - Discord Bot
`[p]playlist copy MyGuildPlaylist --from-scope Guild --to-scope Global`
`[p]playlist copy MyGlobalPlaylist --from-scope Global --to-author Draper#6666 --to-scope User`
`[p]playlist copy MyPersonalPlaylist --from-scope user --to-author Draper#6666 --to-scope Guild --to-guild Red - Discord Bot`
"""
if scope_data is None:
@ -4303,7 +4303,7 @@ class Audio(commands.Cog):
"""Create an empty playlist.
**Usage**:
[p]playlist create playlist_name args
`[p]playlist create playlist_name [args]`
**Args**:
The following are all optional:
@ -4326,9 +4326,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist create MyGuildPlaylist
[p]playlist create MyGlobalPlaylist --scope Global
[p]playlist create MyPersonalPlaylist --scope User
`[p]playlist create MyGuildPlaylist`
`[p]playlist create MyGlobalPlaylist --scope Global`
`[p]playlist create MyPersonalPlaylist --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -4370,7 +4370,7 @@ class Audio(commands.Cog):
"""Delete a saved playlist.
**Usage**:
[p]playlist delete playlist_name_OR_id args
`[p]playlist delete playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -4393,9 +4393,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist delete MyGuildPlaylist
[p]playlist delete MyGlobalPlaylist --scope Global
[p]playlist delete MyPersonalPlaylist --scope User
`[p]playlist delete MyGuildPlaylist`
`[p]playlist delete MyGlobalPlaylist --scope Global`
`[p]playlist delete MyPersonalPlaylist --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -4457,7 +4457,7 @@ class Audio(commands.Cog):
"""Remove duplicate tracks from a saved playlist.
**Usage**:
[p]playlist dedupe playlist_name_OR_id args
`[p]playlist dedupe playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -4480,9 +4480,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist dedupe MyGuildPlaylist
[p]playlist dedupe MyGlobalPlaylist --scope Global
[p]playlist dedupe MyPersonalPlaylist --scope User
`[p]playlist dedupe MyGuildPlaylist`
`[p]playlist dedupe MyGlobalPlaylist --scope Global`
`[p]playlist dedupe MyPersonalPlaylist --scope User`
"""
async with ctx.typing():
if scope_data is None:
@ -4596,12 +4596,12 @@ class Audio(commands.Cog):
):
"""Download a copy of a playlist.
These files can be used with the [p]playlist upload command.
These files can be used with the `[p]playlist upload` command.
Red v2-compatible playlists can be generated by passing True
for the v2 variable.
**Usage**:
[p]playlist download playlist_name_OR_id [v2=True_OR_False] args
`[p]playlist download playlist_name_OR_id [v2=True_OR_False] [args]`
**Args**:
The following are all optional:
@ -4624,9 +4624,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist download MyGuildPlaylist True
[p]playlist download MyGlobalPlaylist False --scope Global
[p]playlist download MyPersonalPlaylist --scope User
`[p]playlist download MyGuildPlaylist True`
`[p]playlist download MyGlobalPlaylist False --scope Global`
`[p]playlist download MyPersonalPlaylist --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -4741,7 +4741,7 @@ class Audio(commands.Cog):
"""Retrieve information from a saved playlist.
**Usage**:
[p]playlist info playlist_name_OR_id args
`[p]playlist info playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -4764,9 +4764,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist info MyGuildPlaylist
[p]playlist info MyGlobalPlaylist --scope Global
[p]playlist info MyPersonalPlaylist --scope User
`[p]playlist info MyGuildPlaylist`
`[p]playlist info MyGlobalPlaylist --scope Global`
`[p]playlist info MyPersonalPlaylist --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -4873,7 +4873,7 @@ class Audio(commands.Cog):
"""List saved playlists.
**Usage**:
[p]playlist list args
`[p]playlist list [args]`
**Args**:
The following are all optional:
@ -4896,9 +4896,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist list
[p]playlist list --scope Global
[p]playlist list --scope User
`[p]playlist list`
`[p]playlist list --scope Global`
`[p]playlist list --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -4998,7 +4998,7 @@ class Audio(commands.Cog):
"""Save the queue to a playlist.
**Usage**:
[p]playlist queue playlist_name
`[p]playlist queue playlist_name [args]`
**Args**:
The following are all optional:
@ -5021,9 +5021,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist queue MyGuildPlaylist
[p]playlist queue MyGlobalPlaylist --scope Global
[p]playlist queue MyPersonalPlaylist --scope User
`[p]playlist queue MyGuildPlaylist`
`[p]playlist queue MyGlobalPlaylist --scope Global`
`[p]playlist queue MyPersonalPlaylist --scope User`
"""
async with ctx.typing():
if scope_data is None:
@ -5101,7 +5101,7 @@ class Audio(commands.Cog):
"""Remove a track from a playlist by url.
**Usage**:
[p]playlist remove playlist_name_OR_id url args
`[p]playlist remove playlist_name_OR_id url [args]`
**Args**:
The following are all optional:
@ -5124,11 +5124,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist remove MyGuildPlaylist https://www.youtube.com/watch?v=MN3x-kAbgFU
[p]playlist remove MyGlobalPlaylist https://www.youtube.com/watch?v=MN3x-kAbgFU
--scope Global
[p]playlist remove MyPersonalPlaylist https://www.youtube.com/watch?v=MN3x-kAbgFU
--scope User
`[p]playlist remove MyGuildPlaylist https://www.youtube.com/watch?v=MN3x-kAbgFU`
`[p]playlist remove MyGlobalPlaylist https://www.youtube.com/watch?v=MN3x-kAbgFU --scope Global`
`[p]playlist remove MyPersonalPlaylist https://www.youtube.com/watch?v=MN3x-kAbgFU --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -5215,7 +5213,7 @@ class Audio(commands.Cog):
"""Save a playlist from a url.
**Usage**:
[p]playlist save name url args
`[p]playlist save name url [args]`
**Args**:
The following are all optional:
@ -5238,12 +5236,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist save MyGuildPlaylist
https://www.youtube.com/playlist?list=PLx0sYbCqOb8Q_CLZC2BdBSKEEB59BOPUM
[p]playlist save MyGlobalPlaylist
https://www.youtube.com/playlist?list=PLx0sYbCqOb8Q_CLZC2BdBSKEEB59BOPUM --scope Global
[p]playlist save MyPersonalPlaylist
https://open.spotify.com/playlist/1RyeIbyFeIJVnNzlGr5KkR --scope User
`[p]playlist save MyGuildPlaylist https://www.youtube.com/playlist?list=PLx0sYbCqOb8Q_CLZC2BdBSKEEB59BOPUM`
`[p]playlist save MyGlobalPlaylist https://www.youtube.com/playlist?list=PLx0sYbCqOb8Q_CLZC2BdBSKEEB59BOPUM --scope Global`
`[p]playlist save MyPersonalPlaylist https://open.spotify.com/playlist/1RyeIbyFeIJVnNzlGr5KkR --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -5313,7 +5308,7 @@ class Audio(commands.Cog):
"""Load a playlist into the queue.
**Usage**:
[p]playlist start playlist_name_OR_id args
` [p]playlist start playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -5336,9 +5331,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist start MyGuildPlaylist
[p]playlist start MyGlobalPlaylist --scope Global
[p]playlist start MyPersonalPlaylist --scope User
`[p]playlist start MyGuildPlaylist`
`[p]playlist start MyGlobalPlaylist --scope Global`
`[p]playlist start MyPersonalPlaylist --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -5483,7 +5478,7 @@ class Audio(commands.Cog):
"""Updates all tracks in a playlist.
**Usage**:
[p]playlist update playlist_name_OR_id args
`[p]playlist update playlist_name_OR_id [args]`
**Args**:
The following are all optional:
@ -5506,9 +5501,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist update MyGuildPlaylist
[p]playlist update MyGlobalPlaylist --scope Global
[p]playlist update MyPersonalPlaylist --scope User
`[p]playlist update MyGuildPlaylist`
`[p]playlist update MyGlobalPlaylist --scope Global`
`[p]playlist update MyPersonalPlaylist --scope User`
"""
if scope_data is None:
@ -5631,10 +5626,10 @@ class Audio(commands.Cog):
"""Uploads a playlist file as a playlist for the bot.
V2 and old V3 playlist will be slow.
V3 Playlist made with [p]playlist download will load a lot faster.
V3 Playlist made with `[p]playlist download` will load a lot faster.
**Usage**:
[p]playlist upload args
`[p]playlist upload [args]`
**Args**:
The following are all optional:
@ -5657,9 +5652,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist upload
[p]playlist upload --scope Global
[p]playlist upload --scope User
`[p]playlist upload`
`[p]playlist upload --scope Global`
`[p]playlist upload --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -5763,7 +5758,7 @@ class Audio(commands.Cog):
"""Rename an existing playlist.
**Usage**:
[p]playlist rename playlist_name_OR_id new_name args
`[p]playlist rename playlist_name_OR_id new_name [args]`
**Args**:
The following are all optional:
@ -5786,9 +5781,9 @@ class Audio(commands.Cog):
Exact guild name
Example use:
[p]playlist rename MyGuildPlaylist RenamedGuildPlaylist
[p]playlist rename MyGlobalPlaylist RenamedGlobalPlaylist --scope Global
[p]playlist rename MyPersonalPlaylist RenamedPersonalPlaylist --scope User
`[p]playlist rename MyGuildPlaylist RenamedGuildPlaylist`
`[p]playlist rename MyGlobalPlaylist RenamedGlobalPlaylist --scope Global`
`[p]playlist rename MyPersonalPlaylist RenamedPersonalPlaylist --scope User`
"""
if scope_data is None:
scope_data = [PlaylistScope.GUILD.value, ctx.author, ctx.guild, False]
@ -6818,8 +6813,8 @@ class Audio(commands.Cog):
async def search(self, ctx: commands.Context, *, query: str):
"""Pick a track with a search.
Use `[p]search list <search term>` to queue all tracks found on YouTube. `[p]search sc
<search term>` will search SoundCloud instead of YouTube.
Use `[p]search list <search term>` to queue all tracks found on YouTube.
`[p]search sc<search term>` will search SoundCloud instead of YouTube.
"""
async def _search_menu(
@ -7382,8 +7377,8 @@ class Audio(commands.Cog):
async def _shuffle_bumpped(self, ctx: commands.Context):
"""Toggle bumped track shuffle.
Set this to disabled if you wish to avoid bumped songs being shuffled. This takes priority
over `[p]shuffle`.
Set this to disabled if you wish to avoid bumped songs being shuffled.
This takes priority over `[p]shuffle`.
"""
dj_enabled = self._dj_status_cache.setdefault(
ctx.guild.id, await self.config.guild(ctx.guild).dj_enabled()