feat: 为报告订阅和游戏控制添加错误处理,以增强稳定性

This commit is contained in:
zhaoyingbo 2025-01-29 01:36:32 +00:00
parent 7540efaa3a
commit f7ccac9b1f

View File

@ -98,29 +98,37 @@ const manageIntent = async (ctx: Context) => {
)
break
case 7:
groupAgent.report.setSubscription(ctx, "daily", true)
groupAgent.report
.setSubscription(ctx, "daily", true)
.catch(() => null)
break
case 8:
groupAgent.report.setSubscription(ctx, "weekly", true)
groupAgent.report
.setSubscription(ctx, "weekly", true)
.catch(() => null)
break
case 9:
groupAgent.report.setSubscription(ctx, "daily", false)
groupAgent.report
.setSubscription(ctx, "daily", false)
.catch(() => null)
break
case 10:
groupAgent.report.setSubscription(ctx, "weekly", false)
groupAgent.report
.setSubscription(ctx, "weekly", false)
.catch(() => null)
break
case 11:
groupAgent.report.gen4Test(ctx, "daily")
groupAgent.report.gen4Test(ctx, "daily").catch(() => null)
break
case 12:
groupAgent.report.gen4Test(ctx, "weekly")
groupAgent.report.gen4Test(ctx, "weekly").catch(() => null)
break
case 13:
soupAgent.startOrStopGame(ctx, true, "manual")
soupAgent.startOrStopGame(ctx, true, "manual").catch(() => null)
break
case 1:
default:
groupAgent.agent(ctx)
groupAgent.agent(ctx).catch(() => null)
break
}
}