koishi-plugin-ets2-tools-tmp 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -88,14 +88,17 @@ module.exports = async (ctx, cfg, session, target, changeType, quantity, reason)
|
|
|
88
88
|
reason: reason
|
|
89
89
|
};
|
|
90
90
|
log(`[V1] 积分修改请求: ${changeUrl}, body: ${JSON.stringify(requestBody)}`);
|
|
91
|
-
const changeResponse = await ctx.http.post(changeUrl, requestBody, {
|
|
91
|
+
const changeResponse = await ctx.http.post(changeUrl, requestBody, {
|
|
92
|
+
timeout: 10000,
|
|
93
|
+
headers: { "Content-Type": "application/json", token }
|
|
94
|
+
});
|
|
92
95
|
log(`[V1] 积分修改响应: ${JSON.stringify(changeResponse)}`);
|
|
93
96
|
|
|
94
97
|
if (changeResponse.code !== 0) {
|
|
95
98
|
return changeResponse.msg || "积分修改失败";
|
|
96
99
|
}
|
|
97
100
|
|
|
98
|
-
return `积分修改成功!\n
|
|
101
|
+
return `积分修改成功!\n操作: ${changeType} ${quantityNum} 积分`;
|
|
99
102
|
|
|
100
103
|
} catch (error) {
|
|
101
104
|
ctx.logger.error(`[V1] 积分修改错误: ${error.message}`);
|