新增漫画购买功能

This commit is contained in:
Yutousama 2022-04-08 13:43:54 +08:00
parent fab0cdf497
commit fe16be6693
2 changed files with 7 additions and 6 deletions

View File

@ -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;
}
}
}

View File

@ -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(" ");