mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-26 13:07:40 +08:00
稍微修改 /runtime 命令的返回格式,添加 /start 打招呼支持
This commit is contained in:
parent
9f9b9fbfa5
commit
16d74a3af5
@ -1,6 +1,6 @@
|
|||||||
## Core
|
## Core
|
||||||
|
|
||||||
VERSION = 0.7.0.4
|
VERSION = 0.7.0.5
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny;
|
|||||||
* the final field that will be updated by gradle automatically.
|
* the final field that will be updated by gradle automatically.
|
||||||
*/
|
*/
|
||||||
public class GradleProjectConfigures {
|
public class GradleProjectConfigures {
|
||||||
public static final String VERSION = "0.7.0.4";
|
public static final String VERSION = "0.7.0.5";
|
||||||
public static final long COMPILE_TIMESTAMP = 1648890683777L;
|
public static final long COMPILE_TIMESTAMP = 1652944218716L;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,7 @@ public class MornyCommands {
|
|||||||
register(
|
register(
|
||||||
new ON(),
|
new ON(),
|
||||||
new Hello(),
|
new Hello(),
|
||||||
|
new HelloOnStart(),
|
||||||
new GetUsernameAndId(),
|
new GetUsernameAndId(),
|
||||||
new EventHack(),
|
new EventHack(),
|
||||||
new Nbnhhsh(),
|
new Nbnhhsh(),
|
||||||
@ -180,6 +181,7 @@ public class MornyCommands {
|
|||||||
@Nonnull @Override public String getDescription () { return "打招呼"; }
|
@Nonnull @Override public String getDescription () { return "打招呼"; }
|
||||||
@Override public void execute (@Nonnull InputCommand command, @Nonnull Update event) { onCommandHelloExec(event); }
|
@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) {
|
private static void onCommandHelloExec (@Nonnull Update event) {
|
||||||
MornyCoeur.extra().exec(new SendSticker(
|
MornyCoeur.extra().exec(new SendSticker(
|
||||||
event.message().chat().id(),
|
event.message().chat().id(),
|
||||||
@ -265,12 +267,12 @@ public class MornyCommands {
|
|||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
- <code>%d</code> cores
|
|
||||||
java runtime:
|
java runtime:
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
vm memory:
|
vm memory:
|
||||||
- <code>%d</code> / <code>%d</code> MB
|
- <code>%d</code> / <code>%d</code> MB
|
||||||
|
- <code>%d</code> cores
|
||||||
coeur version:
|
coeur version:
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
- <code>%s</code>
|
- <code>%s</code>
|
||||||
@ -283,15 +285,15 @@ public class MornyCommands {
|
|||||||
- [<code>%d</code>]""",
|
- [<code>%d</code>]""",
|
||||||
// system
|
// system
|
||||||
escapeHtml(hostname),
|
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")),
|
escapeHtml(System.getProperty("os.version")),
|
||||||
Runtime.getRuntime().availableProcessors(),
|
|
||||||
// java
|
// java
|
||||||
escapeHtml(System.getProperty("java.vm.name")),
|
escapeHtml(System.getProperty("java.vm.vendor")+"."+System.getProperty("java.vm.name")),
|
||||||
escapeHtml(System.getProperty("java.version")),
|
escapeHtml(System.getProperty("java.vm.version")),
|
||||||
// memory
|
// memory
|
||||||
Runtime.getRuntime().totalMemory() / 1024 / 1024,
|
Runtime.getRuntime().totalMemory() / 1024 / 1024,
|
||||||
Runtime.getRuntime().maxMemory() / 1024 / 1024,
|
Runtime.getRuntime().maxMemory() / 1024 / 1024,
|
||||||
|
Runtime.getRuntime().availableProcessors(),
|
||||||
// version
|
// version
|
||||||
escapeHtml(MornySystem.VERSION),
|
escapeHtml(MornySystem.VERSION),
|
||||||
escapeHtml(MornySystem.getJarMd5()),
|
escapeHtml(MornySystem.getJarMd5()),
|
||||||
|
Loading…
Reference in New Issue
Block a user