diff --git a/docs/cog_guides/audio.rst b/docs/cog_guides/audio.rst index 0fd228cc4..17c2b67d9 100644 --- a/docs/cog_guides/audio.rst +++ b/docs/cog_guides/audio.rst @@ -3742,6 +3742,8 @@ llset port Set the Lavalink node port. This command sets the connection port which Audio will use to connect to an unmanaged Lavalink node. +Set port to ``-1`` to disable the port and connect to the specified host via ports ``80``/``443``. + **Arguments** * ``[password]`` - The connection password, defaulting to 2333. diff --git a/redbot/cogs/audio/core/commands/llset.py b/redbot/cogs/audio/core/commands/llset.py index 312f0e754..bf9d86411 100644 --- a/redbot/cogs/audio/core/commands/llset.py +++ b/redbot/cogs/audio/core/commands/llset.py @@ -242,8 +242,11 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass): """Set the Lavalink node port. This command sets the connection port which Audio will use to connect to an unmanaged Lavalink node. + Set port to -1 to disable the port and connect to the specified host via ports 80/443 """ - if port < 0 or port > 65535: + if port < 0: + port = None + elif port > 65535: return await self.send_embed_msg( ctx, title=_("Setting Not Changed"), @@ -307,7 +310,9 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass): if configs["use_external_lavalink"]: msg = "----" + _("Connection Settings") + "---- \n" msg += _("Host: [{host}]\n").format(host=configs["host"]) - msg += _("Port: [{port}]\n").format(port=configs["ws_port"]) + msg += _("Port: [{port}]\n").format( + port=configs["ws_port"] or _("Default HTTP/HTTPS port") + ) msg += _("Password: [{password}]\n").format(password=configs["password"]) msg += _("Secured: [{state}]\n").format(state=configs["secured_ws"])