diff --git a/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java b/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java index abf1949..6f2cc18 100644 --- a/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java +++ b/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java @@ -72,22 +72,23 @@ public class BiliBiliMangeSign extends Model { String[] message = msg.split(" "); int num = 0; int id = 0; - System.out.println(message.length); for (String s : message) { - System.out.println(s); - } - if (message.length < 2) { - try { - id = Integer.parseInt(message[0]); - } catch (Exception e) { - e.printStackTrace(); - QQBotManager.getInstance().sendMessage(qq, "商城id错误"); - return; + try{ + if(id==0){ + id=Integer.parseInt(s); + }else if(num==0){ + num=Integer.parseInt(s); + } + }catch (Exception ignored){ + } - } else { - num = Integer.parseInt(message[1]); } + if (id == 0) { + System.out.println(msg); + for (String s : message) { + System.out.println(s); + } QQBotManager.getInstance().sendMessage(qq, "商城id错误"); return; }