From 16d74a3af56a8acf741baca29604b9dad00cb77b Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Thu, 19 May 2022 15:14:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8D=E5=BE=AE=E4=BF=AE=E6=94=B9=20/runtime?= =?UTF-8?q?=20=E5=91=BD=E4=BB=A4=E7=9A=84=E8=BF=94=E5=9B=9E=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E6=B7=BB=E5=8A=A0=20/start=20=E6=89=93?= =?UTF-8?q?=E6=8B=9B=E5=91=BC=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../sukazyo/cono/morny/GradleProjectConfigures.java | 4 ++-- .../cono/morny/bot/command/MornyCommands.java | 12 +++++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 23d4136..791e9a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.7.0.4 +VERSION = 0.7.0.5 # dependencies diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index d94b461..ad433d0 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.7.0.4"; - public static final long COMPILE_TIMESTAMP = 1648890683777L; + public static final String VERSION = "0.7.0.5"; + public static final long COMPILE_TIMESTAMP = 1652944218716L; } diff --git a/src/main/java/cc/sukazyo/cono/morny/bot/command/MornyCommands.java b/src/main/java/cc/sukazyo/cono/morny/bot/command/MornyCommands.java index 450db41..7c72538 100644 --- a/src/main/java/cc/sukazyo/cono/morny/bot/command/MornyCommands.java +++ b/src/main/java/cc/sukazyo/cono/morny/bot/command/MornyCommands.java @@ -61,6 +61,7 @@ public class MornyCommands { register( new ON(), new Hello(), + new HelloOnStart(), new GetUsernameAndId(), new EventHack(), new Nbnhhsh(), @@ -180,6 +181,7 @@ public class MornyCommands { @Nonnull @Override public String getDescription () { return "打招呼"; } @Override public void execute (@Nonnull InputCommand command, @Nonnull Update event) { onCommandHelloExec(event); } } + private static class HelloOnStart implements ISimpleCommand { @Nonnull @Override public String getName () { return "/start"; }@Nullable @Override public String[] getAliases () { return new String[0]; }@Override public void execute (@Nonnull InputCommand command, @Nonnull Update event) { onCommandHelloExec(event); }} private static void onCommandHelloExec (@Nonnull Update event) { MornyCoeur.extra().exec(new SendSticker( event.message().chat().id(), @@ -265,12 +267,12 @@ public class MornyCommands { - %s - %s - %s - - %d cores java runtime: - %s - %s vm memory: - %d / %d MB + - %d cores coeur version: - %s - %s @@ -283,15 +285,15 @@ public class MornyCommands { - [%d]""", // system escapeHtml(hostname), - escapeHtml(System.getProperty("os.name")), + escapeHtml(String.format("%s (%s)", System.getProperty("os.name"), System.getProperty("os.arch"))), escapeHtml(System.getProperty("os.version")), - Runtime.getRuntime().availableProcessors(), // java - escapeHtml(System.getProperty("java.vm.name")), - escapeHtml(System.getProperty("java.version")), + escapeHtml(System.getProperty("java.vm.vendor")+"."+System.getProperty("java.vm.name")), + escapeHtml(System.getProperty("java.vm.version")), // memory Runtime.getRuntime().totalMemory() / 1024 / 1024, Runtime.getRuntime().maxMemory() / 1024 / 1024, + Runtime.getRuntime().availableProcessors(), // version escapeHtml(MornySystem.VERSION), escapeHtml(MornySystem.getJarMd5()),