nonebot-plugin-cs2match 1.0.1__tar.gz → 1.0.2__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.
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/PKG-INFO +3 -5
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/pyproject.toml +3 -5
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/__init__.py +4 -4
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/rule.py +1 -3
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/tools.py +3 -8
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/README.md +0 -0
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/config.py +0 -0
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/dynamic_config.py +0 -0
- {nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/template.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nonebot-plugin-cs2match
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: 实时追踪 Counter-Strike 2 职业赛事,开赛自动提醒、关键赛况与大比分异动推送。
|
|
5
5
|
Keywords: nonebot,bot,counter-strike,cs2
|
|
6
6
|
Author: StarsetNight
|
|
@@ -12,11 +12,9 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Requires-Dist: aiohttp>=3.13.5
|
|
14
14
|
Requires-Dist: ayafileio>=1.4.6
|
|
15
|
-
Requires-Dist: nonebot-adapter-onebot>=2.4.
|
|
15
|
+
Requires-Dist: nonebot-adapter-onebot>=2.4.0
|
|
16
16
|
Requires-Dist: nonebot-plugin-localstore>=0.7.4
|
|
17
|
-
Requires-Dist: nonebot2>=2.
|
|
18
|
-
Requires-Dist: pydantic>=2.13.4
|
|
19
|
-
Requires-Dist: python-dotenv>=1.2.1
|
|
17
|
+
Requires-Dist: nonebot2>=2.2.0
|
|
20
18
|
Requires-Dist: typst>=0.15.0
|
|
21
19
|
Requires-Python: >=3.10, <4.0
|
|
22
20
|
Project-URL: Homepage, https://github.com/StarsetNight/nonebot-plugin-cs2match
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "nonebot-plugin-cs2match"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.2"
|
|
4
4
|
description = "实时追踪 Counter-Strike 2 职业赛事,开赛自动提醒、关键赛况与大比分异动推送。"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
readme = "README.md"
|
|
@@ -18,11 +18,9 @@ requires-python = ">=3.10,<4.0"
|
|
|
18
18
|
dependencies = [
|
|
19
19
|
"aiohttp>=3.13.5",
|
|
20
20
|
"ayafileio>=1.4.6",
|
|
21
|
-
"nonebot-adapter-onebot>=2.4.
|
|
21
|
+
"nonebot-adapter-onebot>=2.4.0",
|
|
22
22
|
"nonebot-plugin-localstore>=0.7.4",
|
|
23
|
-
"nonebot2>=2.
|
|
24
|
-
"pydantic>=2.13.4",
|
|
25
|
-
"python-dotenv>=1.2.1",
|
|
23
|
+
"nonebot2>=2.2.0",
|
|
26
24
|
"typst>=0.15.0",
|
|
27
25
|
]
|
|
28
26
|
|
|
@@ -10,6 +10,10 @@ from nonebot.permission import SUPERUSER
|
|
|
10
10
|
from nonebot.plugin import PluginMetadata
|
|
11
11
|
|
|
12
12
|
from .config import Config
|
|
13
|
+
# init的配置读取必须先于其他要使用init中配置的导入模块,否则会缺配置读不了
|
|
14
|
+
driver = get_driver()
|
|
15
|
+
global_config = driver.config
|
|
16
|
+
config = get_plugin_config(Config) # 取自config.py中的静态配置
|
|
13
17
|
from .tools import PandaScoreClient, MonitorClient, MatchParser, typst_render
|
|
14
18
|
from .template import help_plain_text, help_text
|
|
15
19
|
from .rule import is_enabled
|
|
@@ -18,10 +22,6 @@ from .dynamic_config import DynamicConfigSystem, PriorityMode
|
|
|
18
22
|
require("nonebot_plugin_localstore")
|
|
19
23
|
from nonebot_plugin_localstore import get_plugin_data_file
|
|
20
24
|
|
|
21
|
-
driver = get_driver()
|
|
22
|
-
global_config = driver.config
|
|
23
|
-
config = get_plugin_config(Config) # 取自config.py中的静态配置
|
|
24
|
-
|
|
25
25
|
panda_client: PandaScoreClient | None = None
|
|
26
26
|
dynamic_config: DynamicConfigSystem | None = None # 取自插件内编写的DynamicConfigSystem
|
|
27
27
|
monitor_client: MonitorClient | None = None
|
{nonebot_plugin_cs2match-1.0.1 → nonebot_plugin_cs2match-1.0.2}/src/nonebot_plugin_cs2match/tools.py
RENAMED
|
@@ -17,17 +17,12 @@ from ayafileio import open
|
|
|
17
17
|
import typst
|
|
18
18
|
|
|
19
19
|
from nonebot.adapters.onebot.v11 import Message, MessageSegment, Bot
|
|
20
|
-
from nonebot import require,
|
|
20
|
+
from nonebot import require, logger
|
|
21
21
|
|
|
22
22
|
require("nonebot_plugin_localstore")
|
|
23
23
|
from nonebot_plugin_localstore import get_plugin_cache_dir
|
|
24
24
|
|
|
25
|
-
from . import template
|
|
26
|
-
from .config import Config
|
|
27
|
-
|
|
28
|
-
driver = get_driver()
|
|
29
|
-
global_config = driver.config
|
|
30
|
-
config = get_plugin_config(Config)
|
|
25
|
+
from . import template, config
|
|
31
26
|
|
|
32
27
|
RENDER_CACHE_DIR = get_plugin_cache_dir() / "render_cache"
|
|
33
28
|
RENDER_CACHE_DIR.mkdir(exist_ok=True)
|
|
@@ -287,7 +282,7 @@ class MatchParser:
|
|
|
287
282
|
reverse=True
|
|
288
283
|
))
|
|
289
284
|
|
|
290
|
-
content =
|
|
285
|
+
content = template.list_match
|
|
291
286
|
|
|
292
287
|
for serie_name, serie_matches in sorted_series.items():
|
|
293
288
|
content += f'#series_card("{serie_name}", [\n'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|