feat(group_horse_racing): 增加赛马消息图片渲染功能

- 在配置中新增图片渲染相关参数:RACE_RENDER_AS_IMAGE、RACE_IMAGE_WIDTH 等
- 复用 danding_qqpush 的 ImageRenderer,使其支持自定义标题
- 在比赛开始、结束和进度播报时,将文本消息转换为带标题的图片发送
- 修复测试用例中的消息发送函数调用
This commit is contained in:
2026-04-04 22:09:53 +08:00
parent 8adc17d311
commit ab1329042a
4 changed files with 49 additions and 7 deletions

View File

@@ -22,6 +22,11 @@ class Config(BaseSettings):
MIN_ODDS: float = 1.2
RACE_DISTANCE: int = 100
RACE_TICK_INTERVAL: int = 5
RACE_RENDER_AS_IMAGE: bool = True
RACE_IMAGE_WIDTH: int = 900
RACE_IMAGE_FONT_SIZE: int = 26
RACE_IMAGE_PADDING: int = 28
RACE_IMAGE_LINE_SPACING: float = 1.35
# 消息撤回配置
MESSAGE_RECALL: dict[str, int] = Field(