diff --git a/src/main/java/com/yutou/qqbot/QQBotManager.java b/src/main/java/com/yutou/qqbot/QQBotManager.java index dfc74d4..2d06898 100644 --- a/src/main/java/com/yutou/qqbot/QQBotManager.java +++ b/src/main/java/com/yutou/qqbot/QQBotManager.java @@ -3,19 +3,6 @@ package com.yutou.qqbot; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.yutou.qqbot.Listeners.QQMessageListener; -import com.yutou.qqbot.models.Animal.TurnipProphet; -import com.yutou.qqbot.models.Commands.BTDownload; -import com.yutou.qqbot.models.Commands.BaiduDown; -import com.yutou.qqbot.models.Commands.Bangumi; -import com.yutou.qqbot.models.Commands.Moyu; -import com.yutou.qqbot.models.Commands.System.*; -import com.yutou.qqbot.models.Model; -import com.yutou.qqbot.models.WebSign.BaiHeHui; -import com.yutou.qqbot.models.WebSign.BiliBiliMangeSign; -import com.yutou.qqbot.models.WebSign.Tsdm; -import com.yutou.qqbot.models.XiaoMi.MiRouter; -import com.yutou.qqbot.models.setu.GetSeTu; -import com.yutou.qqbot.models.setu.QQSetu; import com.yutou.qqbot.utlis.*; import net.mamoe.mirai.Bot; import net.mamoe.mirai.BotFactory; diff --git a/src/main/java/com/yutou/qqbot/models/Animal/TurnipProphet.java b/src/main/java/com/yutou/qqbot/models/Animal/TurnipProphet.java index 162f0ea..2ca1368 100644 --- a/src/main/java/com/yutou/qqbot/models/Animal/TurnipProphet.java +++ b/src/main/java/com/yutou/qqbot/models/Animal/TurnipProphet.java @@ -304,7 +304,7 @@ public class TurnipProphet extends Model { public Map openTurnip(String prices, String pattern) throws Exception { - String url = String.format("http://127.0.0.1:7000/?prices=%s%s", + String url = String.format("http://192.168.31.88:7000/?prices=%s%s", prices, pattern == null ? "" : "&pattern=" + pattern ); @@ -322,8 +322,7 @@ public class TurnipProphet extends Model { JSONObject pr = new JSONObject(); JSONArray array = new JSONArray(); if (list.size() == 0) { - driver.close(); - driver.quit(); + WebClient.getInstance().quit(); return null; } @@ -380,8 +379,7 @@ public class TurnipProphet extends Model { map.put(TurnipProphet.TurnipData.DAY, maxDay); pr.put(TurnipProphet.TurnipData.MODEL, array); map.put(TurnipProphet.TurnipData.MODEL, pr.toJSONString()); - driver.close(); - driver.quit(); + WebClient.getInstance().quit(); return map; } } diff --git a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java index 6de52a0..3de3d28 100644 --- a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java +++ b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java @@ -213,7 +213,8 @@ public class GetSeTu extends Model { @Override public void onDownload(File file) { super.onDownload(file); - QQBotManager.getInstance().sendMessage(file, qq, event.getMessage(), builder.toString()); + String message = QQBotManager.getInstance().sendMessage(file, qq, event.getMessage(), builder.toString()); + Log.i(getModelName(),message); } @Override