Make help command use descriptions and usages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-12-20 17:51:28 +01:00
parent cc9aee3441
commit 0762068465
15 changed files with 258 additions and 13 deletions

View File

@@ -36,6 +36,18 @@ public class AvatarCommand implements MessageCommand
return false;
}
@NotNull
@Override
public String getDescription() {
return "Get someone's avatar, or your own. You can additionally specify a resolution.";
}
@Nullable
@Override
public String getUsage() {
return "[mentioned user] [resolution]";
}
@NotNull
@Override
public CommandCategory getCategory() {
@@ -47,7 +59,7 @@ public class AvatarCommand implements MessageCommand
{
int[] acceptedSizes = Cache.getSupportedAvatarResolutions();
User user = null;
User user;
int resolution = -1;
// we have no specific order for user and resolution, so let's try parsing any arg as resolution