新增机器人停止服务指令

This commit is contained in:
yutou 2021-04-15 13:45:23 +08:00
parent 3bce5d7fd9
commit bfe83babce

View File

@ -30,6 +30,7 @@ public class QQBotManager {
private static class QQCommands { private static class QQCommands {
private final static String QQ_HELP = "!help"; private final static String QQ_HELP = "!help";
private final static String QQ_SYSTEM_STOP = "!stop";
private final static String QQ_UPDATE_IP = "!更新ip"; private final static String QQ_UPDATE_IP = "!更新ip";
private final static String QQ_GET_IP = "!ip"; private final static String QQ_GET_IP = "!ip";
private final static String QQ_OPEN_PC = "!开机"; private final static String QQ_OPEN_PC = "!开机";
@ -255,7 +256,11 @@ public class QQBotManager {
case QQCommands.QQ_BT_RELOAD: case QQCommands.QQ_BT_RELOAD:
BTDownloadManager.getInstance().start(); BTDownloadManager.getInstance().start();
break; break;
case QQCommands.QQ_SYSTEM_STOP:
getInstance().sendMessage("正在停止服务");
System.out.println("结束进程");
System.exit(0);
break;
case QQCommands.QQ_HELP: case QQCommands.QQ_HELP:
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (Field field : QQCommands.class.getDeclaredFields()) { for (Field field : QQCommands.class.getDeclaredFields()) {