40 Commits

Author SHA1 Message Date
OpenClaw Bot
8708c931c8 feat: 添加每周总结功能
- 新增 get_weekly_stats_for_discord() 获取过去7天统计数据
- 新增 generate_weekly_summary_for_discord() 生成周报
- 新增 generate_weekly_summary_image() 生成周报图片
- 新增 weekly_summary.html 模板
- 添加每周日21:00定时推送
- 添加 /weekly_summary 命令手动触发
2026-02-07 03:44:09 +00:00
Ching L
7f81574192 feat(discord): add win/loss status to match messages
All checks were successful
continuous-integration/drone Build is passing
- Added win field to serialize_match_for_discord return data
  - Display victory/defeat emoji and text at start of match messages
  - Extract win status directly from data instead of inferring from embed color
2025-10-24 14:39:41 +08:00
Ching L
bb4ee378d9 feat: add method to recalculate streak from recent matches
All checks were successful
continuous-integration/drone/push Build is passing
- Add recalculate_streak_from_recent_matches to Friend class
- Fetches last 20 matches and recalculates win/loss streaks
- Sorts matches chronologically to ensure accurate calculation
2025-09-11 15:26:18 +08:00
Ching L
7498f413bf fix: resolve streak notification issues
- Initialize global streak_updates variable to prevent NameError
- Fix streak notifications only showing for first match
- Ensure notifications appear once per batch instead of being lost
2025-09-11 15:17:23 +08:00
Ching L
e381dce261 feat: Enhance friend match processing to avoid duplicate API calls and improve streak updates
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing
2025-07-24 10:35:32 +08:00
Ching L
895737927a feat: Optimize match processing by updating streaks before creating database records 2025-07-24 09:54:09 +08:00
Ching L
e103e8706c feat: Add streak tracking and notifications for friends' match results 2025-03-13 16:30:40 +08:00
Ching L
27128c3557 refactor: Remove async from rank changes check function 2025-03-07 11:35:23 +08:00
Ching L
a697a6e636 feat: Add daily rank tracking for Discord friends TUN-143 2025-03-07 11:22:40 +08:00
Ching L
f9ce233099 fix: Adjust match limit and embed image placement logic 2025-03-07 10:13:56 +08:00
Ching L
47f4df7803 refactor: Convert match serialization methods to async 2025-03-06 09:10:42 +08:00
Ching L
f18f03a7f7 refactor: Migrate image generation to async Playwright 2025-03-05 23:01:00 +08:00
Ching L
9c8b360553 feat: Add image generation for recent matches report 2025-03-05 21:54:29 +08:00
Ching L
2bae19643a feat: Add hero name translation for match report embeds 2025-03-05 18:30:50 +08:00
Ching L
e2c6c9ea5b feat: Add image generation and Cloudflare R2 upload support for match reports 2025-03-05 17:50:52 +08:00
Ching
f24106bef1 feat: Add hero name translation utility function 2025-02-20 22:45:46 +08:00
Ching
fd24fc01f7 fix: 修复获取不到开黑数据时报错的问题 2024-05-12 11:57:21 +08:00
Ching
3087dd3085 fix: 修复战报中开黑数据返回格式有误的问题 2024-05-12 11:23:34 +08:00
Ching
eddfcbf7f7 fix: 修复 openapi 接口报错时,战绩消息为空的问题 2024-05-12 01:10:47 +08:00
Ching
f4e17c5126 fix: 修复战报中没有开黑信息的问题 TUN-66 2024-05-11 16:37:02 +08:00
Ching
520409f735 feat: Change radiant_indicator position in serialize_match_for_discord TUN-48 2024-04-05 13:24:22 +08:00
Ching
57f7faf4fb feat: 修改比赛信息格式 #86enwkvn5 2024-03-20 11:47:30 +08:00
Ching
47ceabdd7a feat: 修改比赛信息中的开黑队友名字格式 2024-03-19 18:09:16 +08:00
Ching
ab5f6695e1 feat: Add end time to Match class 2024-03-06 11:01:04 +08:00
Ching
81fc0f28a6 fix(models): Refactor Friend.select to Friend.filter in get_friends_recent_matches() function 2024-02-08 17:09:01 +08:00
Ching
309b4989e7 feat(models): Add deactivate_friend command and active field to Friend model 2024-02-08 15:46:44 +08:00
Ching
fa6bef2c73 fix(dota.py): 当接口没有返回 party size 的时候通过数据库中的 Friend 数据进行比对
当接口没有返回 party size 的时候通过数据库中的 Friend 数据进行比对

Signed-off-by: Ching <loooching@gmail.com>
2023-12-27 16:46:53 +08:00
Ching
61566c20e1 feat(bot.py): 修改获取比赛的频率。增加报错 log
修改获取比赛的频率。增加报错 log

Signed-off-by: Ching <loooching@gmail.com>
2023-11-29 10:44:31 +08:00
Ching
7e7c9e4146 feat(discord_bot.py, dota.py, utils.py): 修改 logger,增加 log
修改 logger,增加 log

Signed-off-by: Ching <loooching@gmail.com>
2023-11-28 16:54:52 +08:00
Ching
01e3c23651 fix(dota.py): 修复 party_size 为 None 时序列化报错的问题
修复 party_size 为 None 时序列化报错的问题

Signed-off-by: Ching <loooching@gmail.com>
2023-10-03 23:11:24 +08:00
Ching
0f4f29332c fix(bot.py, dota.py): 修复 opendota 接口返回时间太长导致 discord 报错的问题;修改 Match.party_size 为 nullable
修复 opendota 接口返回时间太长导致 discord 报错的问题;修改 Match.party_size 为 nullable

Signed-off-by: Ching <loooching@gmail.com>
2023-10-03 22:53:09 +08:00
Ching
42b000fe89 fix(dota.py): 修复 party_size 为 None 导致序列化报错的问题
修复 party_size 为 None 导致序列化报错的问题

Signed-off-by: Ching <loooching@gmail.com>
2023-09-18 18:12:55 +08:00
Ching
f0254be67c fix(utils.py): 修复比赛信息中没有 average_rank 时获取 ranking 报错的问题
修复比赛信息中没有 average_rank 时获取 ranking 报错的问题

Signed-off-by: Ching <loooching@gmail.com>
2023-09-18 17:57:18 +08:00
Ching
cd1fc45044 feat(bot.py, dota.py, utils.py): 增加查询某人战绩的命令
增加查询某人战绩的命令

Signed-off-by: Ching <loooching@gmail.com>
2023-09-18 16:55:24 +08:00
Ching
c401fb5187 feat(dota.py): 修改比赛信息格式,增加最高经济和最高伤害标识
修改比赛信息格式,增加最高经济和最高伤害标识

Signed-off-by: Ching <loooching@gmail.com>
2023-09-17 17:24:33 +08:00
Ching
df9e629cdb feat(bot.py): 修改 logger 格式
修改 logger 格式

Signed-off-by: Ching <loooching@gmail.com>
2023-09-17 16:35:11 +08:00
Ching
862f164f84 feat(dota.py, bot.py, utils.py): 增加 logger 和 heartbeat
增加 logger 和 heartbeat

Signed-off-by: Ching <loooching@gmail.com>
2023-09-16 15:04:59 +08:00
Ching
7bf56375c6 feat(bot.py, utils.py): 修改了消息的格式,更改发送任务循环时间
修改了消息的格式,更改发送任务循环时间

Signed-off-by: Ching <loooching@gmail.com>
2023-09-16 13:03:31 +08:00
Ching
ee77d2bc92 feat(bot.py): 完成了发送消息功能
完成了发送消息功能

Signed-off-by: Ching <loooching@gmail.com>
2023-09-16 04:34:52 +08:00
Ching
4b95403735 feat(dota.py, matches.py): 增加 models,增加获取朋友最近比赛的逻辑
增加 models,增加获取朋友最近比赛的逻辑

Signed-off-by: Ching <loooching@gmail.com>
2023-09-15 16:52:43 +08:00