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 9dcd143..e5f05c7 100644 --- a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java +++ b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java @@ -47,14 +47,29 @@ public class GetSeTu extends Model { QQBotManager.getInstance().sendMessage(qq,"找不到喵~"); return; } - HttpTools.download(json.getJSONArray("data").getJSONObject(0).getJSONObject("urls").getString("original"), + JSONObject item=json.getJSONArray("data").getJSONObject(0); + StringBuilder builder=new StringBuilder(); + builder.append(item.getString("title")); + builder.append("\n"); + builder.append("R18:"); + if(item.getBoolean("r18")){ + builder.append("YES!"); + }else{ + builder.append("NO~"); + } + builder.append("\n"); + builder.append("tags:"); + for (Object tags : item.getJSONArray("tags")) { + builder.append(tags).append("、"); + } + HttpTools.download(item.getJSONObject("urls").getString("original"), System.currentTimeMillis()+"_setu.jpg", true , new DownloadInterface() { @Override public void onDownload(File file) { super.onDownload(file); - QQBotManager.getInstance().sendMessage(file, qq, ""); + QQBotManager.getInstance().sendMessage(file, qq, builder.toString()); } @Override