From fe16be6693d1a2e21335ba4c82d81dd657d3c697 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Fri, 8 Apr 2022 13:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=BC=AB=E7=94=BB=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yutou/qqbot/bilibili/BiliBiliManga.java | 2 +- .../yutou/qqbot/models/WebSign/BiliBiliMangeSign.java | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/yutou/qqbot/bilibili/BiliBiliManga.java b/src/main/java/com/yutou/qqbot/bilibili/BiliBiliManga.java index 9b71605..3fa9d64 100644 --- a/src/main/java/com/yutou/qqbot/bilibili/BiliBiliManga.java +++ b/src/main/java/com/yutou/qqbot/bilibili/BiliBiliManga.java @@ -168,7 +168,7 @@ public class BiliBiliManga { @Override public String toString() { - return "[" + id + "]" + title + " (" + remain_amount + "/" + amount + ") $" + real_cost; + return "[ " + id + " ] " + title + " (" + remain_amount + "/" + amount + ") $" + real_cost; } } } diff --git a/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java b/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java index 5ef403e..b40a18b 100644 --- a/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java +++ b/src/main/java/com/yutou/qqbot/models/WebSign/BiliBiliMangeSign.java @@ -44,11 +44,7 @@ public class BiliBiliMangeSign extends Model { } } else if (msg.equals(QQFromCommands.BILI_MANGA_PAY)) { StringBuilder builder = new StringBuilder(); - if (BiliBiliManga.isPayMission()) { - builder.append("当前已有执行任务:").append(BiliBiliManga.getMission()); - QQBotManager.getInstance().sendMessage(qq, builder.toString()); - return; - } + builder.append("可用积分:").append(BiliBiliManga.getMyPoint()).append("\n"); builder.append("-------商城列表-------").append("\n"); for (BiliBiliManga.Product product : BiliBiliManga.getListProduct()) { @@ -66,8 +62,13 @@ public class BiliBiliMangeSign extends Model { .append("num=物品数量,缺省或-1为全部") .append("\n"); QQBotManager.getInstance().sendMessage(qq, builder.toString()); + if (BiliBiliManga.isPayMission()) { + builder.append("当前已有执行任务:").append(BiliBiliManga.getMission()); + QQBotManager.getInstance().sendMessage(qq, builder.toString()); + } }else if(msg.equals(QQFromCommands.BILI_MANGA_PAY_STOP)){ new BiliBiliManga().stopPayMission(); + QQBotManager.getInstance().sendMessage(qq,"当前任务已取消"); } else if (msg.startsWith(QQFromCommands.BILI_MANGA_PAY)) { msg = msg.replace(QQFromCommands.BILI_MANGA_PAY, ""); String[] message = msg.split(" ");