feat: alias InfoCommand to discord, creator, botuser, and uptime which on each alias just does the action in the main info

This commit is contained in:
ChomeNS
2025-01-18 13:38:31 +07:00
parent a8e4b65355
commit 54389f2e2b
2 changed files with 5 additions and 3 deletions

View File

@@ -1 +1 @@
1477
1478

View File

@@ -57,7 +57,7 @@ public class InfoCommand extends Command {
"botlogintime",
"uptime"
},
new String[] {},
new String[] { "creator", "discord", "botuser", "uptime" },
TrustLevel.PUBLIC,
false
);
@@ -69,7 +69,9 @@ public class InfoCommand extends Command {
final Bot bot = context.bot;
final String action = context.getString(false, false, true);
final String action = !context.userInputCommandName.equals(this.name) ? // if the input command is not `info`
context.userInputCommandName : // use that as the action (e.g. "discord", "creator")
context.getString(false, false, true); // else just take the argument of `info`
switch (action) {
case "creator" -> {