nonebot-plugin-l4d2-server 1.2.0__tar.gz → 1.3.1__tar.gz

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 (115) hide show
  1. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/PKG-INFO +28 -14
  2. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/README.md +25 -12
  3. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/nonebot_plugin_l4d2_server/__init__.py +6 -5
  4. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/nonebot_plugin_l4d2_server/__main__.py +42 -60
  5. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/api/__init__.py +5 -0
  6. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/Help.json +27 -2
  7. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/__init__.py +4 -4
  8. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/draw.py +23 -10
  9. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/domain/L4D2/l4d2/l4d2.json +1 -0
  10. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/domain/L4D2/l4d2.json +1 -0
  11. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/l4_ban/__init__.py +5 -0
  12. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/l4_ban/utils.py +5 -0
  13. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/l4_help/__init__.py +8 -0
  14. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/l4_image/__init__.py +5 -0
  15. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/l4_local/__init__.py +5 -0
  16. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/l4_request/__init__.py +5 -0
  17. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/__init__.py +1 -1
  18. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/convert.py +1 -1
  19. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/html_img.py +33 -12
  20. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/image_tools.py +44 -12
  21. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/anne/anne.html +1 -1
  22. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/anne/group_ip.html +1 -1
  23. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/anne/ip.html +1 -1
  24. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/github.svg +1 -1
  25. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/l.svg +5 -5
  26. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/m.svg +1 -1
  27. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/normal.html +2 -3
  28. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/normal_old.html +1 -1
  29. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/style.css +1 -1
  30. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/vue.css +1 -1
  31. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/w.svg +1 -1
  32. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/workshop.html +8 -8
  33. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_ban → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/ban}/__init__.py +23 -15
  34. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_ban → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/ban}/utils.py +1 -1
  35. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/local}/__init__.py +20 -21
  36. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/local}/download.py +1 -2
  37. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/local}/file.py +1 -2
  38. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/local}/utils.py +2 -2
  39. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/query}/__init__.py +5 -5
  40. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/query}/draw_msg.py +129 -96
  41. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/query}/tj.py +3 -3
  42. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/query}/typing.py +1 -1
  43. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/server/query}/utils.py +3 -3
  44. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/api/request.py +5 -18
  45. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared/utils/database/models.py +32 -0
  46. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/group_store.py +1 -1
  47. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/sb_sources.py +1 -1
  48. nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/utils/__init__.py +5 -0
  49. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/pyproject.toml +3 -2
  50. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/data/L4D2/l4d2/l4d2.json +0 -1
  51. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/data/L4D2/l4d2.json +0 -1
  52. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/database/models.py +0 -18
  53. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/LICENSE +0 -0
  54. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/nonebot_plugin_l4d2_server/config.py +0 -0
  55. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//344/273/213/347/273/215.png" +0 -0
  56. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//344/273/273/345/212/241.png" +0 -0
  57. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//344/277/241/346/201/257.png" +0 -0
  58. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/205/254/345/221/212.png" +0 -0
  59. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/210/200/345/211/221.png" +0 -0
  60. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/210/207/346/215/242.png" +0 -0
  61. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/210/240/351/231/244.png" +0 -0
  62. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/210/267/346/226/260.png" +0 -0
  63. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/215/241/347/273/204.png" +0 -0
  64. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/223/252/351/207/214.png" +0 -0
  65. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/234/260/345/233/276.png" +0 -0
  66. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/257/274/345/205/245.png" +0 -0
  67. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/257/274/345/207/272.png" +0 -0
  68. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//345/275/261.png" +0 -0
  69. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/213/274/345/233/276.png" +0 -0
  70. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/216/242/347/264/242.png" +0 -0
  71. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/216/250/351/200/201.png" +0 -0
  72. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/224/266/351/233/206.png" +0 -0
  73. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/224/273/347/225/245.png" +0 -0
  74. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/233/264/346/226/260.png" +0 -0
  75. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/235/220/346/226/231.png" +0 -0
  76. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/237/245/350/257/242.png" +0 -0
  77. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/240/241/351/252/214.png" +0 -0
  78. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/257/217/346/234/210.png" +0 -0
  79. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/267/261/346/270/212.png" +0 -0
  80. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/267/273/345/212/240.png" +0 -0
  81. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//346/270/205/351/231/244.png" +0 -0
  82. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//347/212/266/346/200/201.png" +0 -0
  83. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//347/255/276/345/210/260.png" +0 -0
  84. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//347/273/221/345/256/232.png" +0 -0
  85. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//350/241/250.png" +0 -0
  86. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//350/241/250/346/203/205.png" +0 -0
  87. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//350/247/222/350/211/262.png" +0 -0
  88. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//350/256/260/345/275/225.png" +0 -0
  89. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//351/205/215/347/275/256.png" +0 -0
  90. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/icon//351/207/215/345/220/257.png" +0 -0
  91. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/texture2d/badge.png +0 -0
  92. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/texture2d/banner.png +0 -0
  93. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/texture2d/bg.jpg +0 -0
  94. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/texture2d/button.png +0 -0
  95. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/core/help}/texture2d/icon.png +0 -0
  96. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/data → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/domain}/font/loli.ttf +0 -0
  97. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/nonebot_plugin_l4d2_server/message.py +0 -0
  98. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation}/commands/__init__.py +0 -0
  99. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation}/commands/server_groups.py +0 -0
  100. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/anne/back.png +0 -0
  101. /nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/back_img/background.jpg → /nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render/img/back_img/background .jpg +0 -0
  102. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/head/head.png +0 -0
  103. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/header/logo.png +0 -0
  104. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/header/player1.jpg +0 -0
  105. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/vac.png +0 -0
  106. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/img/template/vac_white.png +0 -0
  107. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/presentation/render}/model.py +0 -0
  108. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/api/api.py +0 -0
  109. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/api/models.py +0 -0
  110. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/api/utils.py +0 -0
  111. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server → nonebot_plugin_l4d2_server-1.3.1/nonebot_plugin_l4d2_server/shared}/utils/utils.py +0 -0
  112. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/tests/__init__.py +0 -0
  113. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/tests/conftest.py +0 -0
  114. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/tests/help.py +0 -0
  115. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.1}/tests/todo.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-l4d2-server
3
- Version: 1.2.0
3
+ Version: 1.3.1
4
4
  Summary: L4D2 server related operations plugin for NoneBot2
5
5
  Keywords: steam,game,l4d2,nonebot2,plugin
6
6
  Author-Email: Agnes_Digital <Z735803792@163.com>
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Operating System :: OS Independent
16
16
  Project-URL: homepage, https://github.com/Agnes4m/nonebot_plugin_l4d2_server
17
- Requires-Python: <4.0,>=3.9
17
+ Requires-Python: <4.0,>=3.10
18
18
  Requires-Dist: nonebot2>=2.1.0
19
19
  Requires-Dist: nonebot2[fastapi]>=2.3.3
20
20
  Requires-Dist: nonebot-plugin-htmlrender>=0.3.0
@@ -35,6 +35,7 @@ Requires-Dist: pyunpack>=0.3
35
35
  Requires-Dist: aiofiles>=24.1.0
36
36
  Requires-Dist: bs4==0.0.2
37
37
  Requires-Dist: lxml>=6.0.2
38
+ Requires-Dist: playwright==1.57.0
38
39
  Description-Content-Type: text/markdown
39
40
 
40
41
  <!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD046 MD051 -->
@@ -46,7 +47,7 @@ Description-Content-Type: text/markdown
46
47
 
47
48
  <div align="center">
48
49
 
49
- # nonebot_plugin_l4d2_server 1.1.6
50
+ # nonebot_plugin_l4d2_server 1.3.0
50
51
 
51
52
  _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
52
53
 
@@ -87,14 +88,34 @@ _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
87
88
  </a>
88
89
  </div>
89
90
 
90
- ## 指令
91
+ ## 功能
91
92
 
92
- - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
93
93
  - `l4d2帮助` 帮助指令
94
+
95
+ ### 自定义服务器
96
+
97
+ - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
98
+
99
+ ### SourceBans++
100
+
101
+ - 通过 [SourceBans++](https://sbpp.github.io/) 获取服务器的 ban 信息,自动导入ip
102
+
103
+ ### 配置管理
104
+
94
105
  - l4 图片开启/关闭 超管指令 可以修改输出单图是否为图片输出
95
106
  - l4 查找用户 在已知服务器中查找
96
107
  - l4 工坊下载 提供创意工坊 id 下载到服务器和群聊
97
108
 
109
+ ### 自定义查服背景图片
110
+
111
+ 插件支持自定义图片背景,在 `data/L4D2/custom_backgrounds/` 目录下放入 PNG/JPG/JPEG 格式图片即可,插件会自动随机选择使用。
112
+
113
+ 具体位置参考 [数据结构](./docs/standand.md)
114
+
115
+ - 目录不存在时插件会自动创建
116
+ - 放入图片无需重启立即生效
117
+ - 未放置图片时默认使用纯白色背景
118
+
98
119
  ## 安装
99
120
 
100
121
  以下提到的方法 任选**其一** 即可
@@ -156,8 +177,6 @@ conda install nonebot-plugin-l4d2-server
156
177
 
157
178
  ## [数据结构](./docs/standand.md)
158
179
 
159
- 暂未更新
160
-
161
180
  ## env 设置
162
181
 
163
182
  ```bash
@@ -178,15 +197,10 @@ conda install nonebot-plugin-l4d2-server
178
197
 
179
198
  ## 和 0.x.x 更改部分
180
199
 
181
- - 取消了网页控制台(没有卵用)
182
- - 取消了自动重启(与其他插件功能重复)
183
- - 取消了 git 拉取更新(nb 规范用 pypi)
184
- - 删除无用部分(依赖太多难以维护)
185
- - 删除了 anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
186
-
187
200
  ## 其他
188
201
 
189
- - 本人技术很差,如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
202
+ - anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
203
+ - 如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
190
204
  - 如果本插件对你有帮助,不要忘了点个 Star~
191
205
  - 本项目仅供学习使用,请勿用于商业用途
192
206
  - [更新日志](./docs/update.md)
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- # nonebot_plugin_l4d2_server 1.1.6
10
+ # nonebot_plugin_l4d2_server 1.3.0
11
11
 
12
12
  _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
13
13
 
@@ -48,14 +48,34 @@ _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
48
48
  </a>
49
49
  </div>
50
50
 
51
- ## 指令
51
+ ## 功能
52
52
 
53
- - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
54
53
  - `l4d2帮助` 帮助指令
54
+
55
+ ### 自定义服务器
56
+
57
+ - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
58
+
59
+ ### SourceBans++
60
+
61
+ - 通过 [SourceBans++](https://sbpp.github.io/) 获取服务器的 ban 信息,自动导入ip
62
+
63
+ ### 配置管理
64
+
55
65
  - l4 图片开启/关闭 超管指令 可以修改输出单图是否为图片输出
56
66
  - l4 查找用户 在已知服务器中查找
57
67
  - l4 工坊下载 提供创意工坊 id 下载到服务器和群聊
58
68
 
69
+ ### 自定义查服背景图片
70
+
71
+ 插件支持自定义图片背景,在 `data/L4D2/custom_backgrounds/` 目录下放入 PNG/JPG/JPEG 格式图片即可,插件会自动随机选择使用。
72
+
73
+ 具体位置参考 [数据结构](./docs/standand.md)
74
+
75
+ - 目录不存在时插件会自动创建
76
+ - 放入图片无需重启立即生效
77
+ - 未放置图片时默认使用纯白色背景
78
+
59
79
  ## 安装
60
80
 
61
81
  以下提到的方法 任选**其一** 即可
@@ -117,8 +137,6 @@ conda install nonebot-plugin-l4d2-server
117
137
 
118
138
  ## [数据结构](./docs/standand.md)
119
139
 
120
- 暂未更新
121
-
122
140
  ## env 设置
123
141
 
124
142
  ```bash
@@ -139,15 +157,10 @@ conda install nonebot-plugin-l4d2-server
139
157
 
140
158
  ## 和 0.x.x 更改部分
141
159
 
142
- - 取消了网页控制台(没有卵用)
143
- - 取消了自动重启(与其他插件功能重复)
144
- - 取消了 git 拉取更新(nb 规范用 pypi)
145
- - 删除无用部分(依赖太多难以维护)
146
- - 删除了 anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
147
-
148
160
  ## 其他
149
161
 
150
- - 本人技术很差,如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
162
+ - anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
163
+ - 如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
151
164
  - 如果本插件对你有帮助,不要忘了点个 Star~
152
165
  - 本项目仅供学习使用,请勿用于商业用途
153
166
  - [更新日志](./docs/update.md)
@@ -16,17 +16,18 @@
16
16
  """
17
17
 
18
18
  from nonebot import get_driver, require
19
+ from nonebot.plugin import PluginMetadata, inherit_supported_adapters
19
20
 
20
- require("nonebot_plugin_htmlrender")
21
+ # 依赖插件声明 必须在导入其它插件模块之前执行
21
22
  require("nonebot_plugin_alconna")
22
- require("nonebot_plugin_tortoise_orm")
23
23
  require("nonebot_plugin_datastore")
24
+ require("nonebot_plugin_htmlrender")
25
+ require("nonebot_plugin_tortoise_orm")
24
26
 
25
- from nonebot.plugin import PluginMetadata, inherit_supported_adapters # noqa: E402
26
-
27
- from . import __main__ as __main__ # noqa: E402
27
+ from . import __main__ # noqa: E402, F401
28
28
  from .config import ConfigModel # noqa: E402
29
29
  from .l4_help import __version__ # noqa: E402
30
+ from .shared.utils.database import models # noqa: E402, F401
30
31
 
31
32
  driver = get_driver()
32
33
 
@@ -25,7 +25,7 @@ from nonebot.log import logger
25
25
  from nonebot.matcher import Matcher
26
26
  from nonebot.params import CommandArg, CommandStart, RawCommand
27
27
  from nonebot.permission import SUPERUSER
28
- from nonebot.plugin import on_command
28
+ from nonebot.plugin import on_command, on_fullmatch
29
29
  from nonebot_plugin_alconna import UniMessage
30
30
 
31
31
  from .config import config, config_manager
@@ -43,24 +43,24 @@ from .l4_request import (
43
43
  tj_request,
44
44
  )
45
45
  from .message import Gm, Sm
46
- from .utils.api.models import OutServer
47
- from .utils.api.request import L4API, L4D2Api
48
- from .utils.api.utils import out_msg_out
49
- from .utils.group_store import set_group
50
- from .utils.sb_sources import load_pages
51
- from .utils.utils import split_maohao
46
+ from .shared.utils.api.models import OutServer
47
+ from .shared.utils.api.request import L4API, L4D2Api
48
+ from .shared.utils.api.utils import out_msg_out
49
+ from .shared.utils.group_store import set_group
50
+ from .shared.utils.sb_sources import load_pages
51
+ from .shared.utils.utils import split_maohao
52
52
 
53
53
  driver = get_driver()
54
54
 
55
55
  reload_ip()
56
56
 
57
57
 
58
- l4_help = on_command("l4help", aliases={"l4d2帮助"})
58
+ l4_help = on_command("l4_help", aliases={"l4help", "l4d2帮助"})
59
59
 
60
- l4_reload = on_command("l4reload", aliases={"l4刷新,l4重载"})
61
- l4_all = on_command("l4all", aliases={"l4全服"})
62
- l4_connect = on_command("connect", aliases={"l4连接"})
63
- l4_find_player = on_command("l4find", aliases={"l4查找"})
60
+ l4_reload_servers = on_command("l4_reload", aliases={"l4reload", "l4刷新", "l4重载"})
61
+ l4_list_all_servers = on_command("l4_all", aliases={"l4all", "l4全服"})
62
+ l4_connect_server = on_command("l4_connect", aliases={"connect", "l4连接"})
63
+ l4_find_player = on_command("l4_find_player", aliases={"l4find", "l4查找"})
64
64
 
65
65
 
66
66
  config_path = Path(config.l4_path) / "config.json"
@@ -102,7 +102,7 @@ async def _sync_groups_on_startup() -> None:
102
102
 
103
103
 
104
104
  @l4_help.handle()
105
- async def _():
105
+ async def handle_l4_help():
106
106
  """帮助"""
107
107
  logger.info("开始执行[l4d2帮助]")
108
108
  im = await get_l4d2_core_help()
@@ -110,37 +110,11 @@ async def _():
110
110
 
111
111
 
112
112
  @l4_request.handle()
113
- async def _(
113
+ async def handle_server_query(
114
114
  start: str = CommandStart(),
115
115
  command: str = RawCommand(),
116
116
  args: Message = CommandArg(),
117
117
  ):
118
- """
119
- 异步函数,用于处理特定的指令。
120
-
121
- Args:
122
- start (str, optional): 指令的开头部分,默认为 CommandStart() 返回的值。
123
- command (str, optional): 完整的指令字符串,默认为 RawCommand() 返回的值。
124
- args (Message, optional): 指令后的参数,默认为 CommandArg() 返回的值。
125
-
126
- Returns:
127
- None
128
-
129
- Examples:
130
- 示例指令:"/橘5"
131
- - start: "/" (指令的开头部分)
132
- - command: "/橘" (完整的指令字符串)
133
- - args: "5" (指令后的参数)
134
-
135
- Notes:
136
- 1. 如果 start 存在,会将 command 中的 start 部分替换为空字符串。
137
- 2. 如果 command 等于 "anne",则将其替换为 "云"。
138
- 3. 提取 args 中的纯文本内容,如果内容非空且不是数字,则返回。
139
- 4. 如果 args 为空,则将其设置为 None。
140
- 5. 使用 logger 记录处理过程中的信息。
141
- 6. 调用 get_server_detail 函数获取服务器详情,并根据返回结果发送相应的消息。
142
- 7. 如果 get_server_detail 返回 None,则发送 "服务器无响应" 的文本消息。
143
- """
144
118
  logger.info(f"[l4]开始执行请求]:{command}")
145
119
  if start:
146
120
  command = command.replace(start, "")
@@ -170,7 +144,7 @@ async def _(
170
144
 
171
145
 
172
146
  @l4_find_player.handle()
173
- async def _(
147
+ async def handle_find_player(
174
148
  args: Message = CommandArg(),
175
149
  ):
176
150
  # 以后有时间补img格式
@@ -181,7 +155,7 @@ async def _(
181
155
  if len(tag_list) == 1:
182
156
  await UniMessage.text(Sm.no_group_search).send()
183
157
  name = tag_list[0]
184
- out: List[OutServer] = await server_find(is_img=False) # type: ignore
158
+ out = cast(List[OutServer], await server_find(is_img=False))
185
159
  logger.info(out)
186
160
  logger.info(type(out))
187
161
  out_msg = Sm.no_player
@@ -239,13 +213,13 @@ async def _(
239
213
  return None
240
214
 
241
215
 
242
- @l4_all.handle()
243
- async def _():
216
+ @l4_list_all_servers.handle()
217
+ async def handle_all_servers():
244
218
  await out_msg_out(await get_all_server_detail())
245
219
 
246
220
 
247
- @l4_connect.handle()
248
- async def _(args: Message = CommandArg()):
221
+ @l4_connect_server.handle()
222
+ async def handle_connect_server(args: Message = CommandArg()):
249
223
  ip: Optional[str] = args.extract_plain_text()
250
224
  if ip is not None:
251
225
  host, port = split_maohao(ip)
@@ -257,8 +231,8 @@ async def _(args: Message = CommandArg()):
257
231
  )
258
232
 
259
233
 
260
- @l4_reload.handle()
261
- async def _(args: Message = CommandArg()):
234
+ @l4_reload_servers.handle()
235
+ async def handle_reload_servers(args: Message = CommandArg()):
262
236
  arg = args.extract_plain_text().strip()
263
237
  if not arg:
264
238
  with (Path(config.l4_path) / "l4d2.json").open("r", encoding="utf-8") as f:
@@ -337,34 +311,42 @@ async def _(args: Message = CommandArg()):
337
311
 
338
312
 
339
313
  if "云" in COMMAND:
340
- ld_tj = on_command("tj", aliases={"探监"})
341
- ld_zl = on_command("zl")
342
- ld_kl = on_command("kl")
314
+ ld_tj = on_fullmatch("tj")
315
+ ld_zl = on_fullmatch("zl")
316
+ ld_kl = on_fullmatch("kl")
343
317
 
344
318
  @ld_tj.handle()
345
- async def _(matcher: Matcher):
319
+ async def handle_tj_command(matcher: Matcher):
346
320
  await matcher.send("正在寻找牢房信息")
347
321
  await matcher.finish(await tj_request("云", "tj"))
348
322
 
349
323
  @ld_zl.handle()
350
- async def _(matcher: Matcher):
324
+ async def handle_zl_command(matcher: Matcher):
351
325
  await matcher.send("正在寻找牢房信息")
352
326
  await matcher.finish(await tj_request("云", "zl"))
353
327
 
354
328
  @ld_kl.handle()
355
- async def _(matcher: Matcher):
329
+ async def handle_kl_command(matcher: Matcher):
356
330
  await matcher.send("正在寻找牢房信息")
357
331
  await matcher.finish(await tj_request("云", "kl"))
358
332
 
359
333
 
360
334
  ## 以下为配置修改
361
335
 
362
- img_trung = on_command("l4img", aliases={"l4图片"}, permission=SUPERUSER)
363
- style_trung = on_command("l4style", aliases={"l4风格切换"}, permission=SUPERUSER)
336
+ l4_toggle_image = on_command(
337
+ "l4_toggle_image",
338
+ aliases={"l4img", "l4图片"},
339
+ permission=SUPERUSER,
340
+ )
341
+ l4_switch_style = on_command(
342
+ "l4_switch_style",
343
+ aliases={"l4style", "l4风格切换"},
344
+ permission=SUPERUSER,
345
+ )
364
346
 
365
347
 
366
- @img_trung.handle()
367
- async def _(args: Message = CommandArg()):
348
+ @l4_toggle_image.handle()
349
+ async def handle_toggle_image_mode(args: Message = CommandArg()):
368
350
  arg = args.extract_plain_text().strip().lower()
369
351
  if arg == "开启":
370
352
  config_manager.update_image_config(enabled=True)
@@ -376,8 +358,8 @@ async def _(args: Message = CommandArg()):
376
358
  await UniMessage.text("请在参数后加上开启或关闭").finish()
377
359
 
378
360
 
379
- @style_trung.handle()
380
- async def _():
361
+ @l4_switch_style.handle()
362
+ async def handle_switch_style():
381
363
  if config.l4_style == "default":
382
364
  config_manager.update_style_config(style="old")
383
365
  await UniMessage.text("[l4]已切换为旧风格").finish()
@@ -0,0 +1,5 @@
1
+ """兼容转发层 - 请迁移到 infrastructure.api"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..infrastructure.api import * # noqa: F403
@@ -123,8 +123,33 @@
123
123
  "need_ck": false,
124
124
  "need_sk": false,
125
125
  "need_admin": false
126
+ },
127
+ {
128
+ "name": "l4添加ban",
129
+ "desc": "添加ban记录",
130
+ "eg": "l4addban 玩家名 原因",
131
+ "need_ck": false,
132
+ "need_sk": true,
133
+ "need_admin": true
134
+ },
135
+ {
136
+ "name": "l4删除ban",
137
+ "desc": "移除ban记录",
138
+ "eg": "l4delban 玩家名",
139
+ "need_ck": false,
140
+ "need_sk": true,
141
+ "need_admin": true
142
+ },
143
+ {
144
+ "name": "l4查看ban",
145
+ "desc": "查看ban列表",
146
+ "eg": "l4banlist",
147
+ "need_ck": false,
148
+ "need_sk": false,
149
+ "need_admin": true
126
150
  }
127
- ],
151
+ ]
152
+ },
128
153
  "其他服务": {
129
154
  "desc": "一些杂项服务",
130
155
  "data": [
@@ -138,4 +163,4 @@
138
163
  }
139
164
  ]
140
165
  }
141
- }
166
+ }
@@ -5,12 +5,12 @@ from typing import Dict, Union
5
5
  import aiofiles
6
6
  from PIL import Image
7
7
 
8
- from ..config import ICONPATH
9
- from ..l4_image.convert import core_font
10
- from ..l4_image.model import PluginHelp
8
+ from ...config import ICONPATH
9
+ from ...presentation.render.convert import core_font
10
+ from ...presentation.render.model import PluginHelp
11
11
  from .draw import get_help
12
12
 
13
- __version__ = "1.2.0"
13
+ __version__ = "1.3.1"
14
14
  TEXT_PATH = Path(__file__).parent / "texture2d"
15
15
  HELP_DATA = Path(__file__).parent / "help.json"
16
16
 
@@ -1,21 +1,22 @@
1
1
  from copy import deepcopy
2
2
  from pathlib import Path
3
- from typing import Callable, Dict, List, Optional, Tuple
3
+ from typing import Callable, Dict, List, Optional, Tuple, cast
4
4
 
5
5
  from nonebot_plugin_datastore import get_plugin_data
6
6
  from PIL import Image, ImageDraw, ImageFilter, ImageFont
7
7
 
8
- from ..l4_image.convert import convert_img, pic_quality
9
- from ..l4_image.image_tools import crop_center_img
10
- from ..l4_image.model import PluginHelp
8
+ from ...presentation.render.convert import convert_img, pic_quality
9
+ from ...presentation.render.image_tools import crop_center_img
10
+ from ...presentation.render.model import PluginHelp
11
11
 
12
12
  cache: Dict[str, int] = {}
13
13
  Micon_path = Path(__file__).parent / "icon"
14
14
  DEFAULT_ICON = Micon_path / "拼图.png"
15
15
  try:
16
16
  plugin_data = get_plugin_data()
17
+ data_dir = plugin_data.data_dir
17
18
  except ValueError:
18
- plugin_data = Path() / "data"
19
+ data_dir = Path() / "data"
19
20
 
20
21
 
21
22
  def cx(w: int, x: int) -> int:
@@ -77,14 +78,26 @@ async def get_help(
77
78
  enable_cache: bool = True,
78
79
  ) -> bytes:
79
80
  if sub_c is None and is_dark:
80
- sub_c = tuple(x - 50 if x > 50 else x for x in text_color) # type: ignore
81
+ sub_c = cast(
82
+ Tuple[int, int, int],
83
+ tuple(x - 50 if x > 50 else x for x in text_color),
84
+ )
81
85
  elif sub_c is None and not is_dark:
82
- sub_c = tuple(x + 50 if x < 205 else x for x in text_color) # type: ignore
86
+ sub_c = cast(
87
+ Tuple[int, int, int],
88
+ tuple(x + 50 if x < 205 else x for x in text_color),
89
+ )
83
90
 
84
91
  if op_color is None and is_dark:
85
- op_color = tuple(x - 90 if x > 90 else x for x in text_color) # type: ignore
92
+ op_color = cast(
93
+ Tuple[int, int, int],
94
+ tuple(x - 90 if x > 90 else x for x in text_color),
95
+ )
86
96
  elif op_color is None and not is_dark:
87
- op_color = tuple(x + 90 if x < 160 else x for x in text_color) # type: ignore
97
+ op_color = cast(
98
+ Tuple[int, int, int],
99
+ tuple(x + 90 if x < 160 else x for x in text_color),
100
+ )
88
101
 
89
102
  _h = 600
90
103
 
@@ -195,7 +208,7 @@ async def get_help(
195
208
  img = Image.alpha_composite(all_white, img)
196
209
 
197
210
  img = img.convert("RGB")
198
- help_path = plugin_data.data_dir.joinpath("help") / f"{name}.jpg"
211
+ help_path = data_dir / "help" / f"{name}.jpg"
199
212
  help_path.parent.mkdir(parents=True, exist_ok=True)
200
213
  if enable_cache:
201
214
  img.save(
@@ -0,0 +1,5 @@
1
+ """兼容转发层 - 请迁移到 server.ban"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..server.ban import * # noqa: F403
@@ -0,0 +1,5 @@
1
+ """兼容转发层"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..server.ban.utils import * # noqa: F403
@@ -0,0 +1,8 @@
1
+ """兼容转发层 - 请迁移到 core.help"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..core.help import * # noqa: F403
6
+ from ..core.help import __version__ as _ # noqa: F401
7
+
8
+ __version__ = "1.3.1"
@@ -0,0 +1,5 @@
1
+ """兼容转发层 - 请迁移到 presentation.render"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..presentation.render import * # noqa: F403
@@ -0,0 +1,5 @@
1
+ """兼容转发层 - 请迁移到 server.local"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..server.local import * # noqa: F403
@@ -0,0 +1,5 @@
1
+ """兼容转发层 - 请迁移到 server.query"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from ..server.query import * # noqa: F403
@@ -1,6 +1,6 @@
1
1
  from typing import List
2
2
 
3
- from ..utils.api.models import OutServer
3
+ from ...shared.utils.api.models import OutServer
4
4
  from .html_img import server_ip_pic
5
5
 
6
6
 
@@ -9,7 +9,7 @@ from PIL import Image, ImageDraw, ImageFont
9
9
 
10
10
  from .image_tools import draw_center_text_by_line
11
11
 
12
- FONT_PATH = Path(__file__).parent.parent / "data/font/loli.ttf"
12
+ FONT_PATH = Path(__file__).parent.parent.parent / "domain/font/loli.ttf"
13
13
  pic_quality: int = 95
14
14
 
15
15