feat: alias .console server to .csvr for lazy people like me

This commit is contained in:
ChomeNS
2025-04-18 16:19:18 +07:00
parent 2e79c7599f
commit 53860c3c5a
2 changed files with 5 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ public class ConsoleCommand extends Command {
"logtoconsole <true|false>",
"printdisconnectedreason <true|false>"
},
new String[] {},
new String[] { "csvr" },
TrustLevel.OWNER,
true
);
@@ -32,7 +32,9 @@ public class ConsoleCommand extends Command {
public Component execute (final CommandContext context) throws CommandException {
final Bot bot = context.bot;
final String action = context.getString(false, true, true);
final String action = !context.userInputCommandName.equals(this.name)
? "server" // csvr alias (console server), like in the original chomens bot javascript
: context.getString(false, true, true);
switch (action) {
case "server" -> {