修复定时器获取bot为空导致异常问题
This commit is contained in:
parent
7943606dc0
commit
4031b07b0b
@ -33,6 +33,9 @@ public class ApplicationInit implements ApplicationRunner {
|
|||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
Bot bot = QQBotManager.getInstance().getBot();
|
Bot bot = QQBotManager.getInstance().getBot();
|
||||||
|
if(bot==null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
Model useModel = (Model) model.getDeclaredConstructor().newInstance();
|
Model useModel = (Model) model.getDeclaredConstructor().newInstance();
|
||||||
for (Group group : bot.getGroups()) {
|
for (Group group : bot.getGroups()) {
|
||||||
if (QQNumberManager.getManager().isUseModel(group.getId(), model)) {
|
if (QQNumberManager.getManager().isUseModel(group.getId(), model)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user