dev_该合并了 #8

Merged
yutou merged 83 commits from dev_ into master 2024-01-17 17:23:44 +08:00
3 changed files with 25 additions and 15 deletions
Showing only changes of commit 4f5bcc9df3 - Show all commits

View File

@ -33,7 +33,9 @@ public class AppUserTask {
).append("\n"); ).append("\n");
sb.append("当前银瓜子数量:").append(newTask.wallet.silver).append("\n"); sb.append("当前银瓜子数量:").append(newTask.wallet.silver).append("\n");
sb.append("每日领取电池:").append(newTask.dayTask.toMessageFormat()).append("\n"); sb.append("每日领取电池:").append(newTask.dayTask.toMessageFormat()).append("\n");
if (newTask.weekTask != null && !newTask.getWeekTask().isEmpty()) {
newTask.weekTask.forEach(task -> sb.append(task.toMessageFormat(newTask.weekTotal)).append("\n")); newTask.weekTask.forEach(task -> sb.append(task.toMessageFormat(newTask.weekTotal)).append("\n"));
}
return sb.toString(); return sb.toString();
} }

View File

@ -160,6 +160,7 @@ public class BiliBiliManga {
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(BiliBiliManga.sign());
} }
@Data @Data

View File

@ -12,6 +12,7 @@ import com.yutou.qqbot.utlis.Log;
import net.mamoe.mirai.event.events.MessageEvent; import net.mamoe.mirai.event.events.MessageEvent;
import java.io.File; import java.io.File;
@UseModel @UseModel
public class Moyu extends Model { public class Moyu extends Model {
@Override @Override
@ -53,6 +54,8 @@ public class Moyu extends Model {
String ret = HttpTools.get("https://api.j4u.ink/v1/store/other/proxy/remote/moyu.json"); String ret = HttpTools.get("https://api.j4u.ink/v1/store/other/proxy/remote/moyu.json");
JSONObject json = JSON.parseObject(ret); JSONObject json = JSON.parseObject(ret);
HttpTools.download(json.getJSONObject("data").getString("moyu_url"), AppTools.getToDayTime() + "_moyu.jpg", new DownloadInterface() { HttpTools.download(json.getJSONObject("data").getString("moyu_url"), AppTools.getToDayTime() + "_moyu.jpg", new DownloadInterface() {
int count = 3;
@Override @Override
public void onDownload(File file) { public void onDownload(File file) {
super.onDownload(file); super.onDownload(file);
@ -65,7 +68,11 @@ public class Moyu extends Model {
public void onError(Exception e) { public void onError(Exception e) {
super.onError(e); super.onError(e);
e.printStackTrace(); e.printStackTrace();
if (count == 0) {
return;
}
downloadImage(isSend, qq); downloadImage(isSend, qq);
count--;
} }
}); });
} }