From 97d1c32157a644a5ca7a26bfa75345dba6c890f7 Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 17 Apr 2024 21:18:09 +0800 Subject: [PATCH] HeroBot add task failed status support --- heroBot.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/heroBot.mjs b/heroBot.mjs index bc5b655..e793ab0 100644 --- a/heroBot.mjs +++ b/heroBot.mjs @@ -122,12 +122,15 @@ class HeroBot { } //回传任务数据给联盟 - async saveTaskData(task_id, task_token, task_data) { + async saveTaskData(task_id, task_token, task_data, task_status) { let params = { name: this.name, task_id: task_id, task_result: task_data }; + if (typeof(task_status) != 'undefined') { + params.status = task_status; + } params.sign = this.sign(params, task_token); //对参数进行签名 let response = null;