新增提示
This commit is contained in:
parent
973a51428b
commit
4e56d31e43
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user