update qq

This commit is contained in:
Yutousama 2022-10-13 23:22:05 +08:00
parent bfbe81aa11
commit 7ccb852223
2 changed files with 6 additions and 4 deletions

View File

@ -124,9 +124,9 @@ public class BTDownloadManager {
JSONObject item = JSON.parseObject(map);
String text="添加到库:"+item.getString("title")+"\n大妈之家地址:"+item.getString("link");
if (item.containsKey("thumbnail")) {
QQBotManager.getInstance().sendMessage(text);
QQBotManager.getInstance().sendMessage(734332887,text);
} else {
QQBotManager.getInstance().sendMessage(item.getString("thumbnail"),text);
QQBotManager.getInstance().sendMessage(734332887,item.getString("thumbnail"),text);
}
}
}

View File

@ -47,10 +47,12 @@ public class QQBotManager {
return HttpTools.http_post("http://192.168.31.88:802/qq/send.do", json.toString().getBytes(StandardCharsets.UTF_8), 1, header);
}
public String sendMessage(String imageUrl, String message) {
return sendMessage(891655174,imageUrl,message);
}
public String sendMessage(long qq,String imageUrl, String message) {
JSONObject json = new JSONObject();
json.put("qq", 891655174);
json.put("qq", qq);
json.put("message",message);
json.put("image", imageUrl);
Map<String, String> header = new HashMap<>();