Commit Graph

6 Commits

Author SHA1 Message Date
cbc0f5198a fix(onmyoji_gacha): 避免重复签到发放积分 2026-06-20 19:00:41 +08:00
8d26c46323 feat(bot): use runtime api for bot data 2026-06-20 18:20:40 +08:00
c01338f496 refactor(plugins): comprehensive code review - ~35 fixes across 14 plugins
Phase 1 - Plugin code review (14/14 plugins):
- Security: 3x token leak in print→logger.debug, Bearer prefix handling
- Bug: bare except→specific exceptions, HorseState type safety, sync→async
- Critical: response_model undefined, route dead code, sync blocking event loop
- Quality: 11x print()→logger, variable name shadowing, consistent logging

Phase 2 - Deep analysis:
- Fix: payout int truncation→max(1, round(amount*odds))
- Fix: room_store get_lock race condition→dict.setdefault()
- Verify: data_manager f-string SQL is safe (uses ? placeholders)

Infrastructure: review reports generated for all plugins.
2026-05-09 23:22:28 +08:00
7f022b92e0 feat: 抽卡签到功能 - 首次抽卡/三连自动签到获随机积分
- data_manager: 新增 daily_sign_in 表、has_signed_in_today、record_sign_in 方法
- utils: 新增 get_luck_description、format_sign_in_message 函数
- __init__: 新增 try_handle_daily_sign_in 签到入口
- handle_gacha/handle_triple_gacha 成功路径 finish()→send()+签到+return
- 签到失败不影响抽卡主流程,UNIQUE约束防并发重复
2026-04-05 22:07:50 +08:00
dedc872f1b 功能:通过 HTTP API 实现 Danding_QqPush 插件,用于 QQ 群通知
- 增加了通过外部 HTTP API 向 QQ 群组发送消息的核心功能。
- 实现了对长文本消息的图片渲染,以避免被认定为垃圾信息。
- 支持在消息中提及特定的 QQ 用户。
- 创建了用于 API 令牌和图片渲染设置的配置选项。
- 开发了一个测试脚本以验证 API 功能。
- 对现有代码进行了重构,以提高组织性和可维护性。
2026-01-20 21:19:05 +08:00
4a944316fe 首次提交 2025-12-26 22:41:42 +08:00