@sjtdev/koishi-plugin-dota2tracker 1.0.3 → 1.1.1

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.
Files changed (42) hide show
  1. package/lib/index.js +559 -1038
  2. package/package.json +2 -1
  3. package/readme.md +9 -7
  4. package/template/{hero.html → hero/hero_1.ejs} +543 -516
  5. package/template/images/logo_dire.png +0 -0
  6. package/template/images/logo_radiant.png +0 -0
  7. package/template/images/scepter.png +0 -0
  8. package/template/images/scepter_0.png +0 -0
  9. package/template/images/scepter_1.png +0 -0
  10. package/template/images/shard.png +0 -0
  11. package/template/images/shard_0.png +0 -0
  12. package/template/images/shard_1.png +0 -0
  13. package/template/match/match_1.ejs +997 -0
  14. package/template/match/match_2.ejs +440 -0
  15. package/template/player/player_1.ejs +543 -0
  16. package/template/match.html +0 -1027
  17. package/template/player.html +0 -414
  18. /package/{images → template/images}/flag_dire.png +0 -0
  19. /package/{images → template/images}/flag_radiant.png +0 -0
  20. /package/{images → template/images}/hero_badge_1.png +0 -0
  21. /package/{images → template/images}/hero_badge_2.png +0 -0
  22. /package/{images → template/images}/hero_badge_3.png +0 -0
  23. /package/{images → template/images}/hero_badge_4.png +0 -0
  24. /package/{images → template/images}/hero_badge_5.png +0 -0
  25. /package/{images → template/images}/hero_badge_6.png +0 -0
  26. /package/{images → template/images}/medal_0.png +0 -0
  27. /package/{images → template/images}/medal_1.png +0 -0
  28. /package/{images → template/images}/medal_2.png +0 -0
  29. /package/{images → template/images}/medal_3.png +0 -0
  30. /package/{images → template/images}/medal_4.png +0 -0
  31. /package/{images → template/images}/medal_5.png +0 -0
  32. /package/{images → template/images}/medal_6.png +0 -0
  33. /package/{images → template/images}/medal_7.png +0 -0
  34. /package/{images → template/images}/medal_8.png +0 -0
  35. /package/{images → template/images}/medal_8b.png +0 -0
  36. /package/{images → template/images}/medal_8c.png +0 -0
  37. /package/{images → template/images}/star_0.png +0 -0
  38. /package/{images → template/images}/star_1.png +0 -0
  39. /package/{images → template/images}/star_2.png +0 -0
  40. /package/{images → template/images}/star_3.png +0 -0
  41. /package/{images → template/images}/star_4.png +0 -0
  42. /package/{images → template/images}/star_5.png +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sjtdev/koishi-plugin-dota2tracker",
3
3
  "description": "",
4
- "version": "1.0.3",
4
+ "version": "1.1.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -29,6 +29,7 @@
29
29
  "axios": "^1.6.8",
30
30
  "cheerio": "^1.0.0-rc.12",
31
31
  "dotaconstants": "^8.5.0",
32
+ "ejs": "^3.1.10",
32
33
  "moment": "^2.30.1"
33
34
  },
34
35
  "peerDependencies": {
package/readme.md CHANGED
@@ -7,7 +7,7 @@ DOTA2Bot插件-提供自动追踪群友的最新对局的功能(需群友绑
7
7
  在koishi插件市场搜索安装
8
8
 
9
9
  ### 使用
10
- 需在插件配置页填入STRATZ API TOKEN,否则无法使用。
10
+ 需在插件配置页填入STRATZ API TOKEN,否则无法使用。(配置中提供了API的获取链接)
11
11
  在希望推送战报信息的群组使用指令【-订阅本群】,玩家可使用指令【-绑定】来将自身账号与Steam账号绑定,bot会尝试追踪已订阅群组中的绑定玩家的最新对局信息。
12
12
  其他查询功能见下方指令说明。
13
13
  **直接调用help指令可获取更详细的说明,调用【指令 -h】还会有用法示例。(例如:订阅本群 -h)**
@@ -35,12 +35,14 @@ DOTA2Bot插件-提供自动追踪群友的最新对局的功能(需群友绑
35
35
  * <input type="checkbox" checked><del>`查询英雄对战 <英雄ID|英雄名|英雄常用别名>`</del>
36
36
  好像不是很实用
37
37
 
38
- ### Q&A
39
- Q: 为什么图片都这么难看!
40
- A: 作者实在是没有一丝的设计天分,欢迎有想法的设计大佬前来交流。
41
-
42
- Q: 发现bug/使用问题
43
- A: 本插件还在开发中,虽然基础功能都已实现,也难免会因业余作者低下的技术力堆出的shi山造成一些问题,欢迎指出。
38
+ ### 图片模板列表
39
+ 展示见[wiki](./wiki)
40
+ 生成图片已使用ejs模板实现,所有模板都在[template]文件夹下,若是有大佬想自己设计模板欢迎联系我完善数据接口。(当前有很多在模板中后处理的数据,不是很友好)
41
+
42
+ ### 其他问题
43
+ 已知问题:当本插件更新版本后,查询已经查询过的比赛数据可能查询失败。
44
+ * 原因:插件的缓存功能,查询过的比赛数据会缓存至本地以节省API调用次数与服务器流量,再次查询时优先调用本地数据也会提高处理速度。当插件更新时,有可能会新增数据的处理或API查询字段,导致旧的缓存数据缺失部分属性引发生成时报错。(播报比赛战报应该不会有这个问题)
45
+ * 解决:目前在生成失败时会清除缓存,再查询一次就好了。
44
46
 
45
47
  ## 灵感来源&鸣谢
46
48
  * 感谢[SonodaHanami](https://github.com/SonodaHanami)大佬的[Steam_watcher](https://github.com/SonodaHanami/Steam_watcher)项目,是本插件最重要的灵感来源,并授权提供了战报称号系统、英雄代称与播报信息的代码数据。