mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Add an option to auto-use default HTTP(S) port for Lavalink (#5629)
Co-authored-by: Jakub Kuczys <me@jacken.men> Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
This commit is contained in:
parent
31700a226e
commit
9d04f17cd2
@ -3742,6 +3742,8 @@ llset port
|
|||||||
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 unmanaged Lavalink node.
|
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**
|
**Arguments**
|
||||||
|
|
||||||
* ``[password]`` - The connection password, defaulting to 2333.
|
* ``[password]`` - The connection password, defaulting to 2333.
|
||||||
|
|||||||
@ -242,8 +242,11 @@ 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 unmanaged Lavalink node.
|
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(
|
return await self.send_embed_msg(
|
||||||
ctx,
|
ctx,
|
||||||
title=_("Setting Not Changed"),
|
title=_("Setting Not Changed"),
|
||||||
@ -307,7 +310,9 @@ class LavalinkSetupCommands(MixinMeta, metaclass=CompositeMetaClass):
|
|||||||
if configs["use_external_lavalink"]:
|
if configs["use_external_lavalink"]:
|
||||||
msg = "----" + _("Connection Settings") + "---- \n"
|
msg = "----" + _("Connection Settings") + "---- \n"
|
||||||
msg += _("Host: [{host}]\n").format(host=configs["host"])
|
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 += _("Password: [{password}]\n").format(password=configs["password"])
|
||||||
msg += _("Secured: [{state}]\n").format(state=configs["secured_ws"])
|
msg += _("Secured: [{state}]\n").format(state=configs["secured_ws"])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user