Add bot age info

This commit is contained in:
2022-12-25 02:12:39 +01:00
parent 7ac72f9e38
commit 52fe279f35
4 changed files with 21 additions and 5 deletions

View File

@@ -91,13 +91,18 @@ public class BotInfo
embedBuilder.addField("Maintainer", developerMention, true);
// uptime field
embedBuilder.addField("Uptime", FormatUtil.getNiceUptime(), true);
embedBuilder.addField("Uptime", FormatUtil.getNiceTimeDiff(Cache.getStartupTime()), true);
// issue tracker field
embedBuilder.addField("Support",
"[Issue tracker](https://git.beatrice.wtf/mind-overflow/HidekoBot/issues)",
true); //todo: we should probably make this a final field in the config class
// bot birthday field
embedBuilder.addField("Bot age",
Cache.getBotName() + " was created " + FormatUtil.getNiceTimeDiff(Cache.getBotBirthDate()) + "ago!",
false);
return embedBuilder.build();
}
}

View File

@@ -10,6 +10,7 @@ import wtf.beatrice.hidekobot.commands.base.BotInfo;
import wtf.beatrice.hidekobot.objects.commands.CommandCategory;
import wtf.beatrice.hidekobot.objects.commands.MessageCommand;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -19,7 +20,7 @@ public class BotInfoCommand implements MessageCommand
@Override
public LinkedList<String> getCommandLabels() {
return new LinkedList<>(Collections.singletonList("botinfo"));
return new LinkedList<>(Arrays.asList("botinfo", "info"));
}
@Nullable