koishi-plugin-ciyi 1.0.1 → 1.0.2
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.
- package/lib/index.js +4 -5
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.js
CHANGED
|
@@ -337,11 +337,10 @@ ${formattedRanks}`;
|
|
|
337
337
|
async function fetchCiYi(word) {
|
|
338
338
|
const url = `https://ci-ying.oss-cn-zhangjiakou.aliyuncs.com/v1/ci-yi-list/${word}.txt`;
|
|
339
339
|
try {
|
|
340
|
-
const response = await
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
return await response.text();
|
|
340
|
+
const response = await ctx.http.get(url, {
|
|
341
|
+
responseType: "text"
|
|
342
|
+
});
|
|
343
|
+
return response;
|
|
345
344
|
} catch (error) {
|
|
346
345
|
logger.error("Error fetching data:", error);
|
|
347
346
|
return null;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -21,6 +21,8 @@ Koishi 的词意(猜词游戏)插件。根据词语的含义相似程度,
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
### License
|
|
25
|
+
|
|
24
26
|
_Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT license](LICENSE-MIT) at your option._
|
|
25
27
|
|
|
26
28
|
_Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions._
|