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 break
case 7: case 7:
groupAgent.report.setSubscription(ctx, "daily", true) groupAgent.report
.setSubscription(ctx, "daily", true)
.catch(() => null)
break break
case 8: case 8:
groupAgent.report.setSubscription(ctx, "weekly", true) groupAgent.report
.setSubscription(ctx, "weekly", true)
.catch(() => null)
break break
case 9: case 9:
groupAgent.report.setSubscription(ctx, "daily", false) groupAgent.report
.setSubscription(ctx, "daily", false)
.catch(() => null)
break break
case 10: case 10:
groupAgent.report.setSubscription(ctx, "weekly", false) groupAgent.report
.setSubscription(ctx, "weekly", false)
.catch(() => null)
break break
case 11: case 11:
groupAgent.report.gen4Test(ctx, "daily") groupAgent.report.gen4Test(ctx, "daily").catch(() => null)
break break
case 12: case 12:
groupAgent.report.gen4Test(ctx, "weekly") groupAgent.report.gen4Test(ctx, "weekly").catch(() => null)
break break
case 13: case 13:
soupAgent.startOrStopGame(ctx, true, "manual") soupAgent.startOrStopGame(ctx, true, "manual").catch(() => null)
break break
case 1: case 1:
default: default:
groupAgent.agent(ctx) groupAgent.agent(ctx).catch(() => null)
break break
} }
} }