Skip to content

Commit

Permalink
🚀v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Agnes4m committed Aug 19, 2024
1 parent 0f57bd2 commit ba921a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ _✨自动b站粉丝牌✨_

- 已修复二维码获取sk失败的问题
- 已经更新2024.8.2粉丝牌新规则,可以正常使用了
- 新增了一个配置选项,可以设置牌子停止打卡等级,默认20级(只想无脑刷可以无视)
- alconna支持替换saa支持

## 配置说明
Expand Down
26 changes: 15 additions & 11 deletions nonebot_plugin_bilifan/src/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,21 @@ async def watchinglive(self):
heartNum = 0
while True:
tasks = []
for medal in self.medalsNeedDo:
tasks.append(self.api.heartbeat(medal['room_info']['room_id'], medal['medal']['target_id']))
await asyncio.gather(*tasks)
heartNum += 1
log.info(
f"{' '.join([medal['anchor_info']['nick_name'] for medal in self.medalsNeedDo[:5]])} 等共 {len(self.medalsNeedDo)} 个房间的第{heartNum}次心跳包已发送({heartNum}/{HEART_MAX})",
)
await asyncio.sleep(60)
if heartNum >= HEART_MAX:
break
log.success(f"每日{HEART_MAX}分钟任务完成")
for medal in self.medalsNeedDo:
tasks.append(
self.api.heartbeat(
medal["room_info"]["room_id"], medal["medal"]["target_id"]
)
)
await asyncio.gather(*tasks)
heartNum += 1
log.info(
f"{' '.join([medal['anchor_info']['nick_name'] for medal in self.medalsNeedDo[:5]])} 等共 {len(self.medalsNeedDo)} 个房间的第{heartNum}次心跳包已发送({heartNum}/{HEART_MAX})",
)
await asyncio.sleep(60)
if heartNum >= HEART_MAX:
break
log.success(f"每日{HEART_MAX}分钟任务完成")
else:
log.info(f"每日{HEART_MAX}分钟任务开始")
medalsNeedDoList = list(self.medalsNeedDo)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot_plugin_bilifan"
version = "0.4.1"
version = "0.4.2"
description = "刷站粉丝牌子的机器人插件"
authors = ["Agnes_Digital <[email protected]>"]
license = "GPLv3"
Expand Down

0 comments on commit ba921a7

Please sign in to comment.