fix bili live sign bugs
This commit is contained in:
parent
960c3e9c56
commit
00985e7fb8
@ -47,9 +47,12 @@ public class BiliBiliLive extends Model {
|
||||
@Override
|
||||
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
|
||||
super.onMessage(qq, event, isGroup);
|
||||
if (!msg.startsWith(QQGroupCommands.BILI_LIVE_DANMU_SEND)) {
|
||||
return;
|
||||
}
|
||||
StringBuilder message;
|
||||
try {
|
||||
Integer roomId = Integer.getInteger(msg);
|
||||
StringBuilder message;
|
||||
if (BiliBiliUtils.checkLiveRoom(roomId) && !RedisTools.list_isExist("bili_live", roomId + "")) {
|
||||
RedisTools.list_add("bili_live", roomId + "");
|
||||
message = new StringBuilder("live sign Add Success");
|
||||
@ -61,10 +64,15 @@ public class BiliBiliLive extends Model {
|
||||
message.append(id).append("\n");
|
||||
}
|
||||
}
|
||||
QQBotManager.getInstance().sendMessage(qq,message.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = new StringBuilder("live sign Add Error\n");
|
||||
message.append("-----live sign roomId-----\n");
|
||||
Set<String> biliLive = RedisTools.list_get("bili_live");
|
||||
for (String id : biliLive) {
|
||||
message.append(id).append("\n");
|
||||
}
|
||||
}
|
||||
QQBotManager.getInstance().sendMessage(qq, message.toString());
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user