Added !help command to Console
This commit is contained in:
parent
584b396e2b
commit
a9ded5b8b3
1 changed files with 53 additions and 1 deletions
|
|
@ -8,7 +8,59 @@ RetardsServer = libcommon.Group(
|
||||||
|
|
||||||
@libsignal.onMessage(RetardsServer)
|
@libsignal.onMessage(RetardsServer)
|
||||||
def signalControl(usr: str, msg: str):
|
def signalControl(usr: str, msg: str):
|
||||||
if usr == "Malasaur" and msg.startswith("!"):
|
if msg.startswith("!"):
|
||||||
match msg.split():
|
match msg.split():
|
||||||
case ["!command", *cmd] | ["!cmd", *cmd] | ["!run", *cmd] | ["!exec", *cmd]:
|
case ["!command", *cmd] | ["!cmd", *cmd] | ["!run", *cmd] | ["!exec", *cmd]:
|
||||||
libminecraft.sendCommand(' '.join(cmd))
|
libminecraft.sendCommand(' '.join(cmd))
|
||||||
|
case ["!help"]:
|
||||||
|
log = """Serve - Minecraft/Signal bot.
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
!help [<command>] - Get command help.
|
||||||
|
|
||||||
|
Admin commands:
|
||||||
|
!modules <command> - Manage Serve modules.
|
||||||
|
!command|cmd|run|exec <command> - Run Minecraft commands."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
case ["!help", "modules"]:
|
||||||
|
log = """!modules - Manage Serve modules.
|
||||||
|
|
||||||
|
Admin usage:
|
||||||
|
!modules list - List available, loaded and unloaded modules.
|
||||||
|
!modules load <module> [<module> [...]] - Load module(s).
|
||||||
|
!modules unload <module> [<module> [...]] - Unload module(s).
|
||||||
|
!modules reload <module> [<module> [...]] - Reload module(s).
|
||||||
|
!modules update - Download modules from remote and list available updates.
|
||||||
|
!modules install - Install modules from remote into local directory."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
case ["!help", "command"]:
|
||||||
|
log = """!command - Run Minecraft commands.
|
||||||
|
|
||||||
|
Admin usage:
|
||||||
|
!command <command> - Run a Minecraft command in the Server."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
case ["!help", "cmd"]:
|
||||||
|
log = """!cmd - Run Minecraft commands.
|
||||||
|
|
||||||
|
Admin usage:
|
||||||
|
!cmd <command> - Run a Minecraft command in the Server."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
case ["!help", "run"]:
|
||||||
|
log = """!run - Run Minecraft commands.
|
||||||
|
|
||||||
|
Admin usage:
|
||||||
|
!run <command> - Run a Minecraft command in the Server."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
case ["!help", "exec"]:
|
||||||
|
log = """!exec - Run Minecraft commands.
|
||||||
|
|
||||||
|
Admin usage:
|
||||||
|
!exec <command> - Run a Minecraft command in the Server."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
case ["!help", "help"]:
|
||||||
|
log = """!help - Get command help.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
!help - List available commands.
|
||||||
|
!help <command> - Get help about a command."""
|
||||||
|
libsignal.sendMessage(log, RetardsServer)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue