[Audio] Use more of the newer Managed/Unmanaged terminology (#5952)

Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
aikaterna 2023-02-12 13:07:46 -08:00 committed by GitHub
parent e0c335eda2
commit 7e7d5322b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 31 deletions

View File

@ -376,7 +376,7 @@ necessary modifications.
Firstly, stop all Red bots. For each bot using Audio: Firstly, stop all Red bots. For each bot using Audio:
1. Start the bot. 1. Start the bot.
2. Run the command ``[p]llset external``. 2. Run the command ``[p]llset unmanaged``.
3. Stop the bot. 3. Stop the bot.
Next, open a command prompt/terminal window. Navigate to ``<datapath>/cogs/Audio`` for any of your bot Next, open a command prompt/terminal window. Navigate to ``<datapath>/cogs/Audio`` for any of your bot
@ -806,7 +806,7 @@ Do not use quotes in these commands. For example, ``[p]llset host 192.168.10.101
.. code-block:: none .. code-block:: none
[p]llset external [p]llset unmanaged
[p]llset host "yourlavalinkip" [p]llset host "yourlavalinkip"
[p]llset port "port" [p]llset port "port"
[p]llset password "password" [p]llset password "password"
@ -3252,7 +3252,7 @@ llset
**Description** **Description**
Manage Lavalink node configuration settings. This command holds all commands to 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:: .. warning::
@ -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 server to do so. Changing llset command settings have the potential to break
Audio cog connection and playback if the wrong settings are used. Audio cog connection and playback if the wrong settings are used.
"""""""""""""" """""""""""""""
llset external llset unmanaged
"""""""""""""" """""""""""""""
**Syntax** **Syntax**
.. code-block:: none .. code-block:: none
[p]llset external [p]llset unmanaged
or
.. code-block:: none
[p]llsetup unmanaged
**Description** **Description**
Toggle using external Lavalink nodes - requires an existing external Lavalink node for Toggle using unmanaged (user-managed) Lavalink nodes - requires an existing Lavalink
Audio to work, if enabled. This command disables the managed Lavalink server: if you do node for Audio to work, if enabled. This command disables the managed (bot-managed)
not have an external Lavalink node you will be unable to use Audio while this is enabled. 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 llset info
@ -3691,7 +3698,7 @@ llset host
**Description** **Description**
Set the Lavalink node host. This command sets the connection host which 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** **Arguments**
@ -3712,7 +3719,7 @@ llset password
**Description** **Description**
Set the Lavalink node password. This command sets the connection password which 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** **Arguments**
@ -3733,7 +3740,7 @@ llset port
**Description** **Description**
Set the Lavalink node port. This command sets the connection port which 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** **Arguments**
@ -3754,4 +3761,4 @@ llset secured
**Description** **Description**
Set the Lavalink node connection to secured. This toggle sets the connection type 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.

View File

@ -36,7 +36,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
async def command_llset(self, ctx: commands.Context): async def command_llset(self, ctx: commands.Context):
"""`Dangerous commands` Manage Lavalink node configuration settings. """`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, 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. i.e. been told by someone in the Red-Discord Bot support server to do so.
@ -152,11 +152,11 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
), ),
) )
@command_llset.command(name="external", aliases=["unmanaged"]) @command_llset.command(name="unmanaged", aliases=["external"])
async def command_llset_external(self, ctx: commands.Context): async def command_llset_unmanaged(self, ctx: commands.Context):
"""Toggle using external Lavalink nodes - requires an existing external Lavalink node for Audio to work, if enabled. """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() external = await self.config.use_external_lavalink()
await self.config.use_external_lavalink.set(not external) await self.config.use_external_lavalink.set(not external)
@ -164,7 +164,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
if external: if external:
embed = discord.Embed( embed = discord.Embed(
title=_("Setting Changed"), 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")) true_or_false=inline(_("Enabled") if not external else _("Disabled"))
), ),
) )
@ -173,7 +173,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
await self.send_embed_msg( await self.send_embed_msg(
ctx, ctx,
title=_("Setting Changed"), 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")) true_or_false=inline(_("Enabled") if not external else _("Disabled"))
), ),
) )
@ -196,14 +196,14 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
): ):
"""Set the Lavalink node 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.config.host.set(host)
await self.send_embed_msg( await self.send_embed_msg(
ctx, ctx,
title=_("Setting Changed"), title=_("Setting Changed"),
description=_( description=_(
"External Lavalink node host set to {host}. " "Unmanaged Lavalink node host set to {host}. "
"Run `{p}{cmd}` for it to take effect." "Run `{p}{cmd}` for it to take effect."
).format( ).format(
host=inline(host), p=ctx.prefix, cmd=self.command_audioset_restart.qualified_name host=inline(host), p=ctx.prefix, cmd=self.command_audioset_restart.qualified_name
@ -217,7 +217,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
): ):
"""Set the Lavalink node 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.config.password.set(str(password))
@ -225,7 +225,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
ctx, ctx,
title=_("Setting Changed"), title=_("Setting Changed"),
description=_( description=_(
"External Lavalink node password set to {password}. " "Unmanaged Lavalink node password set to {password}. "
"Run `{p}{cmd}` for it to take effect." "Run `{p}{cmd}` for it to take effect."
).format( ).format(
password=inline(password), password=inline(password),
@ -241,7 +241,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
): ):
"""Set the Lavalink node port. """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: if port < 0 or port > 65535:
return await self.send_embed_msg( return await self.send_embed_msg(
@ -254,7 +254,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
ctx, ctx,
title=_("Setting Changed"), title=_("Setting Changed"),
description=_( description=_(
"External Lavalink node port set to {port}. " "Unmanaged Lavalink node port set to {port}. "
"Run `{p}{cmd}` for it to take effect." "Run `{p}{cmd}` for it to take effect."
).format( ).format(
port=inline(str(port)), port=inline(str(port)),
@ -268,7 +268,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
async def command_llset_secured(self, ctx: commands.Context): async def command_llset_secured(self, ctx: commands.Context):
"""Set the Lavalink node connection to secured. """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() state = await self.config.secured_ws()
await self.config.secured_ws.set(not state) await self.config.secured_ws.set(not state)
@ -278,7 +278,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
ctx, ctx,
title=_("Setting Changed"), title=_("Setting Changed"),
description=_( 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." "Run `{p}{cmd}` for it to take effect."
).format( ).format(
p=ctx.prefix, p=ctx.prefix,
@ -291,7 +291,7 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
ctx, ctx,
title=_("Setting Changed"), title=_("Setting Changed"),
description=_( 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" "{secured_protocol} protocol and wil use {unsecured_protocol} instead .\n\n"
"Run `{p}{cmd}` for it to take effect." "Run `{p}{cmd}` for it to take effect."
).format(p=ctx.prefix, cmd=self.command_audioset_restart.qualified_name), ).format(p=ctx.prefix, cmd=self.command_audioset_restart.qualified_name),

View File

@ -86,7 +86,7 @@ DANGEROUS_COMMANDS = {
"usually you will never have to change this, " "usually you will never have to change this, "
"before considering changing it please consult our support team." "before considering changing it please consult our support team."
), ),
"command_llset_external": _( "command_llset_unmanaged": _(
"This command will disable the managed Lavalink node, " "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 toggle this command you must specify an external Lavalink node to connect to, "
"if you do not do so Audio will stop working." "if you do not do so Audio will stop working."