update:涩图模块发送回执

fix:修复大头菜模块未关闭浏览器
del:移除未使用import
This commit is contained in:
Yutousama 2022-08-05 10:45:16 +08:00
parent d737730768
commit 8f8fa41acf
3 changed files with 5 additions and 19 deletions

View File

@ -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;

View File

@ -304,7 +304,7 @@ public class TurnipProphet extends Model {
public Map<String, String> 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;
}
}

View File

@ -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