修复B站漫画签到的空指针错误

This commit is contained in:
yutou 2023-06-25 08:40:24 +08:00
parent 8df36edd2d
commit 3d3046f1d7
2 changed files with 5 additions and 7 deletions

View File

@ -35,6 +35,9 @@ public class BiliBiliMangeSign extends Model {
@Override @Override
public void onMessage(Long qq, MessageEvent event, boolean isGroup) { public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
super.onMessage(qq, event, isGroup); super.onMessage(qq, event, isGroup);
if(user==null){
return;
}
BiliBiliManga manga = new BiliBiliManga(user); BiliBiliManga manga = new BiliBiliManga(user);
if (msg.equals(QQFromCommands.BILI_MANGA_SIGN)) { if (msg.equals(QQFromCommands.BILI_MANGA_SIGN)) {
String msg; String msg;

View File

@ -345,12 +345,7 @@ public class BangumiTools {
} }
public static void main(String[] args) { public static void main(String[] args) {
List<String> list = BangumiTools.reportSearchBangumi("处刑少女的生存之道");
/*for (String s : list) { System.out.println(BangumiTools.reportToDayBangumi());
System.out.println(s);
}*/
JSONObject test=new JSONObject();
test.put("data",JSON.toJSON(list));
System.out.println(test);
} }
} }