diff --git a/src/main/java/app/Properties.java b/src/main/java/app/Properties.java index ffb1e301..0a64353a 100644 --- a/src/main/java/app/Properties.java +++ b/src/main/java/app/Properties.java @@ -69,13 +69,19 @@ public Properties() throws IOException { this.botDiscordId ); this.wynnIconUrl = getProperty("wynnIconUrl"); - this.guildBannerUrl = getProperty("guildBannerUrl"); + this.guildBannerUrl = getEnv("GUILD_BANNER_URL", "https://wynn-guild-banner.toki317.dev/banners/"); this.logTimeZone = TimeZone.getTimeZone(getProperty("logTimeZone")); } private String getEnv(String name) { - return System.getenv(name); + return getEnv(name, null); + } + + private String getEnv(String name, String fallback) { + String value = System.getenv(name); + if (value == null) return fallback; + return value; } private int getEnvInt(String name, int fallback) { diff --git a/src/main/resources/project.properties b/src/main/resources/project.properties index 1245d5a1..42670ed6 100644 --- a/src/main/resources/project.properties +++ b/src/main/resources/project.properties @@ -4,7 +4,6 @@ botLogChannelsMax=4 logTimeZone=Asia/Tokyo repositoryUrl=https://github.com/motoki317/moto-bot githubImagesUrl=https://motoki317.github.io/images/ -guildBannerUrl=https://wynn-guild-banner.herokuapp.com/banners/ mainColor=#7FE3FD botServerInviteUrl=https://discord.gg/hdKfEeV wynnIconUrl=https://cdn.wynncraft.com/img/ico/favicon-96x96.png