mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
[Audio] Playlist list, local queue, DJ Role fix (#2191)
Fix for `playlist list`: added forgotten variable plus return for formatting (fixes #2190) i18n addditions: DJ Role toggle, Thumbnail display toggle `audioset settings`: added missed end of line return `queue` fix: added indentation to not have the currently playing song info repeated in the queue display when playing local songs `local play` and `local folder` now display the appropriate menu when DJ role is on.
This commit is contained in:
parent
4369095a51
commit
7b260cdafc
@ -253,7 +253,9 @@ class Audio(commands.Cog):
|
|||||||
|
|
||||||
dj_enabled = await self.config.guild(ctx.guild).dj_enabled()
|
dj_enabled = await self.config.guild(ctx.guild).dj_enabled()
|
||||||
await self.config.guild(ctx.guild).dj_enabled.set(not dj_enabled)
|
await self.config.guild(ctx.guild).dj_enabled.set(not dj_enabled)
|
||||||
await self._embed_msg(ctx, "DJ role enabled: {}.".format(not dj_enabled))
|
await self._embed_msg(
|
||||||
|
ctx, _("DJ role enabled: {true_or_false}.".format(true_or_false=not dj_enabled))
|
||||||
|
)
|
||||||
|
|
||||||
@audioset.command()
|
@audioset.command()
|
||||||
@checks.mod_or_permissions(administrator=True)
|
@checks.mod_or_permissions(administrator=True)
|
||||||
@ -332,7 +334,7 @@ class Audio(commands.Cog):
|
|||||||
jarbuild = redbot.core.__version__
|
jarbuild = redbot.core.__version__
|
||||||
|
|
||||||
vote_percent = data["vote_percent"]
|
vote_percent = data["vote_percent"]
|
||||||
msg = "----" + _("Server Settings") + "----"
|
msg = "----" + _("Server Settings") + "----\n"
|
||||||
if emptydc_enabled:
|
if emptydc_enabled:
|
||||||
msg += _("Disconnect timer: [{num_seconds}]\n").format(
|
msg += _("Disconnect timer: [{num_seconds}]\n").format(
|
||||||
num_seconds=self._dynamic_time(emptydc_timer)
|
num_seconds=self._dynamic_time(emptydc_timer)
|
||||||
@ -370,7 +372,9 @@ class Audio(commands.Cog):
|
|||||||
"""Toggle displaying a thumbnail on audio messages."""
|
"""Toggle displaying a thumbnail on audio messages."""
|
||||||
thumbnail = await self.config.guild(ctx.guild).thumbnail()
|
thumbnail = await self.config.guild(ctx.guild).thumbnail()
|
||||||
await self.config.guild(ctx.guild).thumbnail.set(not thumbnail)
|
await self.config.guild(ctx.guild).thumbnail.set(not thumbnail)
|
||||||
await self._embed_msg(ctx, _("Thumbnail display: {}.").format(not thumbnail))
|
await self._embed_msg(
|
||||||
|
ctx, _("Thumbnail display: {true_or_false}.").format(true_or_false=not thumbnail)
|
||||||
|
)
|
||||||
|
|
||||||
@audioset.command()
|
@audioset.command()
|
||||||
@checks.mod_or_permissions(administrator=True)
|
@checks.mod_or_permissions(administrator=True)
|
||||||
@ -567,6 +571,8 @@ class Audio(commands.Cog):
|
|||||||
return await menu(ctx, folder_page_list, DEFAULT_CONTROLS)
|
return await menu(ctx, folder_page_list, DEFAULT_CONTROLS)
|
||||||
else:
|
else:
|
||||||
await menu(ctx, folder_page_list, LOCAL_FOLDER_CONTROLS)
|
await menu(ctx, folder_page_list, LOCAL_FOLDER_CONTROLS)
|
||||||
|
else:
|
||||||
|
await menu(ctx, folder_page_list, LOCAL_FOLDER_CONTROLS)
|
||||||
|
|
||||||
@local.command(name="search")
|
@local.command(name="search")
|
||||||
async def local_search(self, ctx, *, search_words):
|
async def local_search(self, ctx, *, search_words):
|
||||||
@ -1097,7 +1103,7 @@ class Audio(commands.Cog):
|
|||||||
(
|
(
|
||||||
bold(playlist_name),
|
bold(playlist_name),
|
||||||
_("Tracks: {num}").format(num=len(tracks)),
|
_("Tracks: {num}").format(num=len(tracks)),
|
||||||
_("Author: {name}").format(self.bot.get_user(author)),
|
_("Author: {name}\n").format(name=self.bot.get_user(author)),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -2360,7 +2366,7 @@ class Audio(commands.Cog):
|
|||||||
if await self._check_external():
|
if await self._check_external():
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
colour=await ctx.embed_colour(),
|
colour=await ctx.embed_colour(),
|
||||||
title=_("Websocket port set to {}.").format(ws_port),
|
title=_("Websocket port set to {port}.").format(port=ws_port),
|
||||||
)
|
)
|
||||||
embed.set_footer(text=_("External lavalink server set to True."))
|
embed.set_footer(text=_("External lavalink server set to True."))
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user