Skip to content

Commit

Permalink
[Audio] Use more of the newer Managed/Unmanaged terminology (#5952)
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Kuczys <[email protected]>
  • Loading branch information
aikaterna and Jackenmen authored Feb 12, 2023
1 parent e0c335e commit 7e7d532
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
35 changes: 21 additions & 14 deletions docs/cog_guides/audio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ necessary modifications.
Firstly, stop all Red bots. For each bot using Audio:

1. Start the bot.
2. Run the command ``[p]llset external``.
2. Run the command ``[p]llset unmanaged``.
3. Stop the bot.

Next, open a command prompt/terminal window. Navigate to ``<datapath>/cogs/Audio`` for any of your bot
Expand Down Expand Up @@ -806,7 +806,7 @@ Do not use quotes in these commands. For example, ``[p]llset host 192.168.10.101

.. code-block:: none
[p]llset external
[p]llset unmanaged
[p]llset host "yourlavalinkip"
[p]llset port "port"
[p]llset password "password"
Expand Down Expand Up @@ -3252,7 +3252,7 @@ llset
**Description**

Manage Lavalink node configuration settings. This command holds all commands to
manage an unmanaged (external) or managed Lavalink node.
manage an unmanaged (user-managed) or managed (bot-managed) Lavalink node.

.. warning::

Expand All @@ -3261,21 +3261,28 @@ manage an unmanaged (external) or managed Lavalink node.
server to do so. Changing llset command settings have the potential to break
Audio cog connection and playback if the wrong settings are used.

""""""""""""""
llset external
""""""""""""""
"""""""""""""""
llset unmanaged
"""""""""""""""

**Syntax**

.. code-block:: none
[p]llset external
[p]llset unmanaged
or

.. code-block:: none
[p]llsetup unmanaged
**Description**

Toggle using external Lavalink nodes - requires an existing external Lavalink node for
Audio to work, if enabled. This command disables the managed Lavalink server: if you do
not have an external Lavalink node you will be unable to use Audio while this is enabled.
Toggle using unmanaged (user-managed) Lavalink nodes - requires an existing Lavalink
node for Audio to work, if enabled. This command disables the managed (bot-managed)
Lavalink server: if you do not have an unmanaged Lavalink node set up, you will be
unable to use Audio while this is enabled.

""""""""""
llset info
Expand Down Expand Up @@ -3691,7 +3698,7 @@ llset host
**Description**

Set the Lavalink node host. This command sets the connection host which
Audio will use to connect to an external Lavalink node.
Audio will use to connect to an unmanaged Lavalink node.

**Arguments**

Expand All @@ -3712,7 +3719,7 @@ llset password
**Description**

Set the Lavalink node password. This command sets the connection password which
Audio will use to connect to an external Lavalink node.
Audio will use to connect to an unmanaged Lavalink node.

**Arguments**

Expand All @@ -3733,7 +3740,7 @@ llset port
**Description**

Set the Lavalink node port. This command sets the connection port which
Audio will use to connect to an external Lavalink node.
Audio will use to connect to an unmanaged Lavalink node.

**Arguments**

Expand All @@ -3754,4 +3761,4 @@ llset secured
**Description**

Set the Lavalink node connection to secured. This toggle sets the connection type
to secured or unsecured when connecting to an external Lavalink node.
to secured or unsecured when connecting to an unmanaged Lavalink node.
32 changes: 16 additions & 16 deletions redbot/cogs/audio/core/commands/llset.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
async def command_llset(self, ctx: commands.Context):
"""`Dangerous commands` Manage Lavalink node configuration settings.
This command block holds all commands to manage an unmanaged (external) or managed Lavalink node.
This command block holds all commands to configure an unmanaged (user maintained) or managed (bot maintained) Lavalink node.
You should not mess with any command in here unless you have a valid reason to,
i.e. been told by someone in the Red-Discord Bot support server to do so.
Expand Down Expand Up @@ -152,19 +152,19 @@ async def validate_input(cog, arg):
),
)

@command_llset.command(name="external", aliases=["unmanaged"])
async def command_llset_external(self, ctx: commands.Context):
"""Toggle using external Lavalink nodes - requires an existing external Lavalink node for Audio to work, if enabled.
@command_llset.command(name="unmanaged", aliases=["external"])
async def command_llset_unmanaged(self, ctx: commands.Context):
"""Toggle using external (unmanaged) Lavalink nodes - requires an existing Lavalink node for Audio to work, if enabled.
This command disables the managed Lavalink server, if you do not have an external Lavalink node you will be unable to use Audio while this is enabled.
This command disables the managed Lavalink server. If you do not have another Lavalink node set up, you will be unable to use Audio while this is enabled.
"""
external = await self.config.use_external_lavalink()
await self.config.use_external_lavalink.set(not external)
async with ctx.typing():
if external:
embed = discord.Embed(
title=_("Setting Changed"),
description=_("External Lavalink server: {true_or_false}.").format(
description=_("Unmanaged Lavalink server: {true_or_false}.").format(
true_or_false=inline(_("Enabled") if not external else _("Disabled"))
),
)
Expand All @@ -173,7 +173,7 @@ async def command_llset_external(self, ctx: commands.Context):
await self.send_embed_msg(
ctx,
title=_("Setting Changed"),
description=_("External Lavalink server: {true_or_false}.").format(
description=_("Unmanaged Lavalink server: {true_or_false}.").format(
true_or_false=inline(_("Enabled") if not external else _("Disabled"))
),
)
Expand All @@ -196,14 +196,14 @@ async def command_llset_host(
):
"""Set the Lavalink node host.
This command sets the connection host which Audio will use to connect to an external Lavalink node.
This command sets the connection host which Audio will use to connect to an unmanaged Lavalink node.
"""
await self.config.host.set(host)
await self.send_embed_msg(
ctx,
title=_("Setting Changed"),
description=_(
"External Lavalink node host set to {host}. "
"Unmanaged Lavalink node host set to {host}. "
"Run `{p}{cmd}` for it to take effect."
).format(
host=inline(host), p=ctx.prefix, cmd=self.command_audioset_restart.qualified_name
Expand All @@ -217,15 +217,15 @@ async def command_llset_password(
):
"""Set the Lavalink node password.
This command sets the connection password which Audio will use to connect to an external Lavalink node.
This command sets the connection password which Audio will use to connect to an unmanaged Lavalink node.
"""

await self.config.password.set(str(password))
await self.send_embed_msg(
ctx,
title=_("Setting Changed"),
description=_(
"External Lavalink node password set to {password}. "
"Unmanaged Lavalink node password set to {password}. "
"Run `{p}{cmd}` for it to take effect."
).format(
password=inline(password),
Expand All @@ -241,7 +241,7 @@ async def command_llset_wsport(
):
"""Set the Lavalink node port.
This command sets the connection port which Audio will use to connect to an external Lavalink node.
This command sets the connection port which Audio will use to connect to an unmanaged Lavalink node.
"""
if port < 0 or port > 65535:
return await self.send_embed_msg(
Expand All @@ -254,7 +254,7 @@ async def command_llset_wsport(
ctx,
title=_("Setting Changed"),
description=_(
"External Lavalink node port set to {port}. "
"Unmanaged Lavalink node port set to {port}. "
"Run `{p}{cmd}` for it to take effect."
).format(
port=inline(str(port)),
Expand All @@ -268,7 +268,7 @@ async def command_llset_wsport(
async def command_llset_secured(self, ctx: commands.Context):
"""Set the Lavalink node connection to secured.
This toggle sets the connection type to secured or unsecured when connecting to an external Lavalink node.
This toggle sets the connection type to secured or unsecured when connecting to an unmanaged Lavalink node.
"""
state = await self.config.secured_ws()
await self.config.secured_ws.set(not state)
Expand All @@ -278,7 +278,7 @@ async def command_llset_secured(self, ctx: commands.Context):
ctx,
title=_("Setting Changed"),
description=_(
"External Lavalink node will now connect using the secured {secured_protocol} protocol.\n\n"
"Unmanaged Lavalink node will now connect using the secured {secured_protocol} protocol.\n\n"
"Run `{p}{cmd}` for it to take effect."
).format(
p=ctx.prefix,
Expand All @@ -291,7 +291,7 @@ async def command_llset_secured(self, ctx: commands.Context):
ctx,
title=_("Setting Changed"),
description=_(
"External Lavalink node will no longer connect using the secured "
"Unmanaged Lavalink node will no longer connect using the secured "
"{secured_protocol} protocol and wil use {unsecured_protocol} instead .\n\n"
"Run `{p}{cmd}` for it to take effect."
).format(p=ctx.prefix, cmd=self.command_audioset_restart.qualified_name),
Expand Down
2 changes: 1 addition & 1 deletion redbot/cogs/audio/core/events/dpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"usually you will never have to change this, "
"before considering changing it please consult our support team."
),
"command_llset_external": _(
"command_llset_unmanaged": _(
"This command will disable the managed Lavalink node, "
"if you toggle this command you must specify an external Lavalink node to connect to, "
"if you do not do so Audio will stop working."
Expand Down

0 comments on commit 7e7d532

Please sign in to comment.