新增漫画购买功能
This commit is contained in:
parent
fe16be6693
commit
82c130a506
@ -61,27 +61,26 @@ public class BiliBiliMangeSign extends Model {
|
||||
.append("\n")
|
||||
.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)){
|
||||
QQBotManager.getInstance().sendMessage(qq, builder.toString());
|
||||
} else if (msg.equals(QQFromCommands.BILI_MANGA_PAY_STOP)) {
|
||||
new BiliBiliManga().stopPayMission();
|
||||
QQBotManager.getInstance().sendMessage(qq,"当前任务已取消");
|
||||
QQBotManager.getInstance().sendMessage(qq, "当前任务已取消");
|
||||
} else if (msg.startsWith(QQFromCommands.BILI_MANGA_PAY)) {
|
||||
msg = msg.replace(QQFromCommands.BILI_MANGA_PAY, "");
|
||||
String[] message = msg.split(" ");
|
||||
int num = -1;
|
||||
int id = 0;
|
||||
for (String s : message) {
|
||||
try{
|
||||
if(id==0){
|
||||
id=Integer.parseInt(s);
|
||||
}else if(num==-1){
|
||||
num=Integer.parseInt(s);
|
||||
try {
|
||||
if (id == 0) {
|
||||
id = Integer.parseInt(s);
|
||||
} else if (num == -1) {
|
||||
num = Integer.parseInt(s);
|
||||
}
|
||||
}catch (Exception ignored){
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -99,8 +98,8 @@ public class BiliBiliMangeSign extends Model {
|
||||
@Override
|
||||
public void out(String data) {
|
||||
super.out(data);
|
||||
if(!data.startsWith("[2]")&&!data.startsWith("[4]")&&!data.startsWith("[1]")){
|
||||
QQBotManager.getInstance().sendMessage(qq,"任务异常:"+data);
|
||||
if (!data.startsWith("[2]") && !data.startsWith("[4]") && !data.startsWith("[1]")) {
|
||||
QQBotManager.getInstance().sendMessage(qq, "任务异常:" + data);
|
||||
manga.stopPayMission();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user