From 0d87eede7039c748e16c40d27b732efa12accb39 Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 Date: Thu, 30 Jul 2026 17:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85systemd?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=B8=94=E6=9C=AA=E6=8F=90=E4=BE=9BDiscord?= =?UTF-8?q?=E4=BB=A4=E7=89=8C=E6=97=B6=E5=87=BA=E7=8E=B0=E7=9A=84=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- .../WebAPI/Configuration/OpenApiConfiguration.kt | 2 +- .../thewhitedog9487/WebAPI/Startup/SystemdInstallerManager.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7d73bbc..b99a5fb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ plugins { } group = "xyz.thewhitedog9487" -version = "0.8.1" +version = "0.8.2" java { toolchain { diff --git a/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt b/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt index 46b02a9..72b3e72 100644 --- a/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt +++ b/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt @@ -21,7 +21,7 @@ class OpenApiConfiguration { .contact(Contact() .name("TheWhiteDog9487") .url("https://www.github.com/TheWhiteDog9487/WebAPI")) - .version("0.8.1") + .version("0.8.2") .license(License() .name("WTFPL") .url("https://spdx.org/licenses/WTFPL")) ) diff --git a/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Startup/SystemdInstallerManager.kt b/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Startup/SystemdInstallerManager.kt index 8836acf..b6ba541 100644 --- a/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Startup/SystemdInstallerManager.kt +++ b/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Startup/SystemdInstallerManager.kt @@ -63,7 +63,7 @@ fun ProcessArguments(CommandLineArguments: Array) { val DiscordBotToken = if ("--Discord_Bot_Token" in CommandLineArguments && CommandLineArguments.getOrNull(CommandLineArguments.indexOf("--Discord_Bot_Token") + 1) != null ){ CommandLineArguments[CommandLineArguments.indexOf("--Discord_Bot_Token") + 1] } - else System.getenv("Discord_Bot_Token") + else System.getenv().getOrDefault("Discord_Bot_Token", "") if (DiscordBotToken.isEmpty()) { Logger.error { "必须通过--Discord_Bot_Token参数或Discord_Bot_Token环境变量提供Discord机器人的令牌以使本程序正常工作。" } throw IllegalArgumentException("缺少必须的--Discord_Bot_Token参数") }