mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 19:24:53 +08:00
稍微修改 /runtime 命令的返回格式,添加 /start 打招呼支持
This commit is contained in:
parent
9f9b9fbfa5
commit
16d74a3af5
@ -1,6 +1,6 @@
|
||||
## Core
|
||||
|
||||
VERSION = 0.7.0.4
|
||||
VERSION = 0.7.0.5
|
||||
|
||||
# dependencies
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
- <code>%s</code>
|
||||
- <code>%s</code>
|
||||
- <code>%s</code>
|
||||
- <code>%d</code> cores
|
||||
java runtime:
|
||||
- <code>%s</code>
|
||||
- <code>%s</code>
|
||||
vm memory:
|
||||
- <code>%d</code> / <code>%d</code> MB
|
||||
- <code>%d</code> cores
|
||||
coeur version:
|
||||
- <code>%s</code>
|
||||
- <code>%s</code>
|
||||
@ -283,15 +285,15 @@ public class MornyCommands {
|
||||
- [<code>%d</code>]""",
|
||||
// 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()),
|
||||
|
Loading…
Reference in New Issue
Block a user