RoverSign 的群活跃度 hook - 写入缓冲区,定时批量刷写
(group_id: str, bot_id: str, bot_self_id: str)
| 96 | _activity_buffer[f"{user_id}:{bot_id}:{bot_self_id}"] = (user_id, bot_id, bot_self_id) |
| 97 | |
| 98 | async def rover_group_activity_hook(group_id: str, bot_id: str, bot_self_id: str): |
| 99 | """RoverSign 的群活跃度 hook - 写入缓冲区,定时批量刷写""" |
| 100 | if PUSH_GUARD.get(): |
| 101 | return |
| 102 | if not is_from_rover_plugin(): |
| 103 | return |
| 104 | if not group_id: |
| 105 | return |
| 106 | _group_activity_buffer[f"{group_id}:{bot_id}:{bot_self_id}"] = (group_id, bot_id, bot_self_id) |
| 107 | |
| 108 | # 安装 hooks 并注册 |
| 109 | logger.info("[库洛签到·插件] 开始安装和注册 hooks...") |
nothing calls this directly
no test coverage detected