Make repository URL a property
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
a28781b806
commit
8b1c1b4d04
@ -218,6 +218,16 @@ public class Cache
|
||||
return propertiesSource.getProperty("bot.version");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bot's source code URL.
|
||||
*
|
||||
* @return a String containing the base URL of the repository, including a <b>trailing slash</b>.
|
||||
*/
|
||||
public static String getRepositoryUrl() {
|
||||
String url = propertiesSource.getProperty("repo.base_url");
|
||||
return url.endsWith("/") ? url : url + "/";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bot's global color.
|
||||
*
|
||||
|
@ -105,9 +105,10 @@ public class BotInfo
|
||||
embedBuilder.addField("Uptime", FormatUtil.getNiceTimeDiff(Cache.getStartupTime()), true);
|
||||
|
||||
// issue tracker field
|
||||
|
||||
String link = "[Issue tracker](" + Cache.getRepositoryUrl() + "issues)";
|
||||
embedBuilder.addField("Support",
|
||||
"[Issue tracker](https://git.beatrice.wtf/bea/HidekoBot/issues)",
|
||||
true); //todo: we should probably make this a final field in the config class
|
||||
link, true);
|
||||
|
||||
// bot birthday field
|
||||
embedBuilder.addField("Bot age",
|
||||
|
@ -1 +1,2 @@
|
||||
bot.version=${project.version}
|
||||
repo.base_url=https://git.beatrice.wtf/bea/HidekoBot/
|
Loading…
Reference in New Issue
Block a user