修复斗鱼日报手动触发未走Dify的问题
变更项:\n1. 将普通命令
This commit is contained in:
@@ -462,8 +462,11 @@ class DouyuRedisManager:
|
||||
|
||||
|
||||
class DouyuPlugin(MessagePluginInterface):
|
||||
# 报告结构有新增(粉丝向弹幕萃取区块),提升缓存版本以触发重新生成。
|
||||
_DAILY_REPORT_CACHE_VERSION = 4
|
||||
# 报告缓存版本号:
|
||||
# 1. 版本升级后会自动让历史缓存失效,避免继续复用旧文本/旧图片;
|
||||
# 2. 本次将版本提升到 5,用于修复“手动触发日报未走 Dify(命中缓存)”的问题,
|
||||
# 确保升级后首次执行会重新走 LLM 生成链路。
|
||||
_DAILY_REPORT_CACHE_VERSION = 5
|
||||
FEATURE_KEY = "DOUYU_MONITOR"
|
||||
FEATURE_DESCRIPTION = "🎮 斗鱼开播提醒 [订阅斗鱼 房间号, 取消订阅斗鱼 房间号]"
|
||||
|
||||
@@ -736,7 +739,14 @@ class DouyuPlugin(MessagePluginInterface):
|
||||
await self.bot.send_text_message(roomid, "日期格式错误,请使用:#斗鱼弹幕日报 2026-04-07", sender)
|
||||
return True, "日期格式错误"
|
||||
await self.bot.send_text_message(roomid, f"⏳ 正在生成斗鱼弹幕日报:{anchor_day}", sender)
|
||||
delivered = await self._send_daily_reports(anchor_day, target_group_id=roomid, force=True)
|
||||
# 普通手动命令也默认重生成,避免命中缓存后看起来“没有走 Dify”。
|
||||
# 定时任务仍保留缓存策略,这里只影响人工触发路径。
|
||||
delivered = await self._send_daily_reports(
|
||||
anchor_day,
|
||||
target_group_id=roomid,
|
||||
force=True,
|
||||
force_regenerate=True,
|
||||
)
|
||||
if delivered:
|
||||
return True, f"斗鱼弹幕日报已发送:{anchor_day}"
|
||||
await self.bot.send_text_message(roomid, f"暂无可发送的斗鱼弹幕日报:{anchor_day}", sender)
|
||||
|
||||
Reference in New Issue
Block a user