新增涩图
更新QQ机器人
This commit is contained in:
parent
75f3a68faf
commit
6a68e95f45
2
pom.xml
2
pom.xml
@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>net.mamoe</groupId>
|
||||
<artifactId>mirai-core-jvm</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<version>2.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlinx</groupId>
|
||||
|
@ -24,16 +24,15 @@ public class GetSeTu extends Model {
|
||||
@Override
|
||||
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
|
||||
super.onMessage(qq, event, isGroup);
|
||||
if ("来点色图".equals(msg)||"来点涩图".equals(msg)){
|
||||
String ret=HttpTools.get("https://api.ixiaowai.cn/api/api.php?return=json");
|
||||
JSONObject json=JSONObject.parseObject(ret);
|
||||
if ("来点色图".equals(msg) || "来点涩图".equals(msg)) {
|
||||
String ret = HttpTools.get("https://api.ixiaowai.cn/api/api.php?return=json");
|
||||
JSONObject json = JSONObject.parseObject(ret);
|
||||
HttpTools.download(json.getString("imgurl"),
|
||||
"setu.jpg", new DownloadInterface() {
|
||||
@Override
|
||||
public void onDownload(File file) {
|
||||
super.onDownload(file);
|
||||
QQBotManager.getInstance().sendMessage(file,qq,"");
|
||||
file.deleteOnExit();
|
||||
QQBotManager.getInstance().sendMessage(file, qq, "");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user