From 9bfa35710fe01b9fcb476c400c074ada36ccf933 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Tue, 17 May 2022 15:08:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=A4=A7=E9=87=8F=20aliases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../cono/morny/GradleProjectConfigures.java | 4 ++-- .../cc/sukazyo/cono/morny/ServerMain.java | 23 +++++++++++++------ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8d5c313..884ff8e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.6.5.0 +VERSION = 0.6.5.1 # dependencies diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index db94338..efee5b7 100644 --- a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java +++ b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java @@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny; * the final field that will be updated by gradle automatically. */ public class GradleProjectConfigures { - public static final String VERSION = "0.6.5.0"; - public static final long COMPILE_TIMESTAMP = 1652768698515L; + public static final String VERSION = "0.6.5.1"; + public static final long COMPILE_TIMESTAMP = 1652771241057L; } diff --git a/src/main/java/cc/sukazyo/cono/morny/ServerMain.java b/src/main/java/cc/sukazyo/cono/morny/ServerMain.java index a0fa6ea..518c9b4 100644 --- a/src/main/java/cc/sukazyo/cono/morny/ServerMain.java +++ b/src/main/java/cc/sukazyo/cono/morny/ServerMain.java @@ -53,6 +53,9 @@ public class ServerMain { * 赋值为程序启动的时间,从而造成阻挡程序启动之前的消息事件处理效果。 * *
  • + * {@code --auto-cmd} (下面两个)选项 {@code --auto-cmd-list} 和 {@code --auto-cmd-remove} 的合并版本 + *
  • + *
  • * {@code --auto-cmd-list} 使 morny 在启动时自动依据程序本体更新登录 bot 的命令列表 *
  • *
  • @@ -92,11 +95,11 @@ public class ServerMain { outdatedBlock = true; continue; } - case "--no-hello", "-hf" -> { + case "--no-hello", "-hf", "--quiet", "-q" -> { showWelcome = false; continue; } - case "--only-hello", "-o" -> { + case "--only-hello", "-ho", "-o", "-hi" -> { welcomeEchoMode = true; continue; } @@ -104,31 +107,37 @@ public class ServerMain { versionEchoMode = true; continue; } - case "--token" -> { + case "--token", "-t" -> { i++; key = args[i]; continue; } - case "--username" -> { + case "--username", "-u" -> { i++; username = args[i]; continue; } - case "--master" -> { + case "--master", "-mm" -> { i++; master = Long.parseLong(args[i]); continue; } - case "--trusted-chat" -> { + case "--trusted-chat", "-trs" -> { i++; trustedChat = Long.parseLong(args[i]); continue; } - case "--trusted-reader-dinner" -> { + //noinspection SpellCheckingInspection + case "--trusted-reader-dinner", "-trsd" -> { i++; trustedReadersOfDinner.add(Long.parseLong(args[i])); continue; } + case "--auto-cmd", "-cmd", "-c" -> { + autoCmdList = true; + autoCmdRemove = true; + continue; + } case "--auto-cmd-list", "-ca" -> { autoCmdList = true; continue;