From 4031b07b0bf7a7f8e72e3ff662b6bfad50a168ec Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Thu, 28 Apr 2022 09:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E8=8E=B7=E5=8F=96bot=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/qqbot/utlis/ApplicationInit.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/yutou/qqbot/utlis/ApplicationInit.java b/src/main/java/com/yutou/qqbot/utlis/ApplicationInit.java index 2e56aa6..797a3c2 100644 --- a/src/main/java/com/yutou/qqbot/utlis/ApplicationInit.java +++ b/src/main/java/com/yutou/qqbot/utlis/ApplicationInit.java @@ -33,6 +33,9 @@ public class ApplicationInit implements ApplicationRunner { new Thread(() -> { try { Bot bot = QQBotManager.getInstance().getBot(); + if(bot==null){ + return; + } Model useModel = (Model) model.getDeclaredConstructor().newInstance(); for (Group group : bot.getGroups()) { if (QQNumberManager.getManager().isUseModel(group.getId(), model)) {