ErisPulse 2.3.3.dev0__tar.gz → 2.3.4.dev0__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.
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/LICENSE +3 -3
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/PKG-INFO +6 -20
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/README.md +1 -16
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/pyproject.toml +14 -1
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Bases/__init__.pyi +14 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Bases/adapter.py +13 -1
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Bases/adapter.pyi +140 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Bases/module.pyi +52 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/__init__.pyi +26 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/base.pyi +62 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/command.pyi +113 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/exceptions.pyi +43 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/message.pyi +93 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/meta.pyi +92 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/notice.pyi +108 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/request.pyi +76 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/wrapper.py +2 -3
- erispulse-2.3.4.dev0/src/ErisPulse/Core/Event/wrapper.pyi +403 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/__init__.py +16 -13
- erispulse-2.3.4.dev0/src/ErisPulse/Core/__init__.pyi +16 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/_self_config.pyi +72 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/adapter.pyi +229 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/config.pyi +70 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/exceptions.pyi +60 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/lifecycle.py +6 -1
- erispulse-2.3.4.dev0/src/ErisPulse/Core/lifecycle.pyi +92 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/logger.pyi +168 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/module.pyi +178 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/router.pyi +120 -0
- erispulse-2.3.4.dev0/src/ErisPulse/Core/storage.pyi +273 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/__init__.py +10 -9
- erispulse-2.3.4.dev0/src/ErisPulse/__init__.pyi +309 -0
- erispulse-2.3.4.dev0/src/ErisPulse/__main__.pyi +24 -0
- erispulse-2.3.4.dev0/src/ErisPulse/sdk_protocol.py +143 -0
- erispulse-2.3.4.dev0/src/ErisPulse/sdk_protocol.pyi +97 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/utils/__init__.py +1 -1
- erispulse-2.3.4.dev0/src/ErisPulse/utils/__init__.pyi +16 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/__init__.py +11 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/__init__.pyi +13 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/__main__.py +225 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/__main__.pyi +81 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/base.py +52 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/base.pyi +50 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/__init__.py +6 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/__init__.pyi +12 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/init.py +400 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/init.pyi +82 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/install.py +307 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/install.pyi +70 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/list.py +165 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/list.pyi +56 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/list_remote.py +128 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/list_remote.pyi +47 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/run.py +112 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/run.pyi +48 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/self_update.py +237 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/self_update.pyi +59 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/uninstall.py +37 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/uninstall.pyi +37 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/upgrade.py +62 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/commands/upgrade.pyi +38 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/registry.py +112 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/cli/registry.pyi +99 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/console.pyi +20 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/package_manager.pyi +224 -0
- erispulse-2.3.4.dev0/src/ErisPulse/utils/reload_handler.pyi +64 -0
- erispulse-2.3.3.dev0/.github/ISSUE_TEMPLATE/config.yml +0 -5
- erispulse-2.3.3.dev0/.github/ISSUE_TEMPLATE/module_submission.md +0 -38
- erispulse-2.3.3.dev0/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- erispulse-2.3.3.dev0/.github/assets/docs/install_pip.gif +0 -0
- erispulse-2.3.3.dev0/.github/assets/erispulse_logo.png +0 -0
- erispulse-2.3.3.dev0/.github/scripts/update_packages.py +0 -125
- erispulse-2.3.3.dev0/.github/tools/merge_md.py +0 -522
- erispulse-2.3.3.dev0/.github/tools/update-api-docs.py +0 -557
- erispulse-2.3.3.dev0/.github/workflows/auto-tag-release.yml +0 -95
- erispulse-2.3.3.dev0/.github/workflows/auto-update-docs.yml +0 -152
- erispulse-2.3.3.dev0/.github/workflows/auto-update-packages.yml +0 -84
- erispulse-2.3.3.dev0/.github/workflows/code-quality-check.yml +0 -86
- erispulse-2.3.3.dev0/.github/workflows/pypi-publish.yml +0 -91
- erispulse-2.3.3.dev0/.python-version +0 -1
- erispulse-2.3.3.dev0/CHANGELOG.md +0 -689
- erispulse-2.3.3.dev0/CODE_OF_CONDUCT.md +0 -54
- erispulse-2.3.3.dev0/CONTRIBUTING.md +0 -62
- erispulse-2.3.3.dev0/SECURITY.md +0 -25
- erispulse-2.3.3.dev0/devs/test.py +0 -396
- erispulse-2.3.3.dev0/devs/test_adapter.py +0 -225
- erispulse-2.3.3.dev0/devs/test_cmd.py +0 -419
- erispulse-2.3.3.dev0/devs/test_event.py +0 -100
- erispulse-2.3.3.dev0/devs/test_event_wrapper.py +0 -181
- erispulse-2.3.3.dev0/devs/test_files/test.docx +0 -0
- erispulse-2.3.3.dev0/devs/test_files/test.jpg +0 -0
- erispulse-2.3.3.dev0/devs/test_files/test.mp4 +0 -0
- erispulse-2.3.3.dev0/docs/README.md +0 -49
- erispulse-2.3.3.dev0/docs/ai/AIDocs/ErisPulse-AdapterDev.md +0 -8397
- erispulse-2.3.3.dev0/docs/ai/AIDocs/ErisPulse-Core.md +0 -7650
- erispulse-2.3.3.dev0/docs/ai/AIDocs/ErisPulse-Full.md +0 -9321
- erispulse-2.3.3.dev0/docs/ai/AIDocs/ErisPulse-ModuleDev.md +0 -3737
- erispulse-2.3.3.dev0/docs/ai/AIDocs/no-api/ErisPulse-AdapterDev.md +0 -3823
- erispulse-2.3.3.dev0/docs/ai/AIDocs/no-api/ErisPulse-Core.md +0 -3076
- erispulse-2.3.3.dev0/docs/ai/AIDocs/no-api/ErisPulse-Full.md +0 -4747
- erispulse-2.3.3.dev0/docs/ai/AIDocs/no-api/ErisPulse-ModuleDev.md +0 -3737
- erispulse-2.3.3.dev0/docs/ai/README.md +0 -25
- erispulse-2.3.3.dev0/docs/ai/module-generation.md +0 -65
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Bases/__init__.md +0 -14
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Bases/adapter.md +0 -151
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Bases/module.md +0 -65
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/__init__.md +0 -38
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/base.md +0 -95
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/command.md +0 -194
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/exceptions.md +0 -45
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/message.md +0 -122
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/meta.md +0 -121
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/notice.md +0 -141
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/request.md +0 -101
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/Event/wrapper.md +0 -511
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/_self_config.md +0 -82
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/adapter.md +0 -285
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/config.md +0 -90
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/exceptions.md +0 -76
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/lifecycle.md +0 -108
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/logger.md +0 -166
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/module.md +0 -239
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/router.md +0 -142
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/storage.md +0 -356
- erispulse-2.3.3.dev0/docs/api/ErisPulse/Core/ux.md +0 -110
- erispulse-2.3.3.dev0/docs/api/ErisPulse/__init__.md +0 -423
- erispulse-2.3.3.dev0/docs/api/ErisPulse/__main__.md +0 -28
- erispulse-2.3.3.dev0/docs/api/ErisPulse/utils/__init__.md +0 -14
- erispulse-2.3.3.dev0/docs/api/ErisPulse/utils/cli.md +0 -176
- erispulse-2.3.3.dev0/docs/api/ErisPulse/utils/console.md +0 -23
- erispulse-2.3.3.dev0/docs/api/ErisPulse/utils/package_manager.md +0 -261
- erispulse-2.3.3.dev0/docs/api/ErisPulse/utils/reload_handler.md +0 -75
- erispulse-2.3.3.dev0/docs/api/README.md +0 -164
- erispulse-2.3.3.dev0/docs/core/README.md +0 -22
- erispulse-2.3.3.dev0/docs/core/adapters.md +0 -107
- erispulse-2.3.3.dev0/docs/core/best-practices.md +0 -326
- erispulse-2.3.3.dev0/docs/core/cli.md +0 -78
- erispulse-2.3.3.dev0/docs/core/concepts.md +0 -38
- erispulse-2.3.3.dev0/docs/core/event-system.md +0 -597
- erispulse-2.3.3.dev0/docs/core/lazy-loading.md +0 -261
- erispulse-2.3.3.dev0/docs/core/modules.md +0 -659
- erispulse-2.3.3.dev0/docs/core/router.md +0 -535
- erispulse-2.3.3.dev0/docs/core/self-config.md +0 -188
- erispulse-2.3.3.dev0/docs/development/README.md +0 -44
- erispulse-2.3.3.dev0/docs/development/adapter.md +0 -454
- erispulse-2.3.3.dev0/docs/development/cli.md +0 -88
- erispulse-2.3.3.dev0/docs/development/module.md +0 -701
- erispulse-2.3.3.dev0/docs/platform-features/README.md +0 -220
- erispulse-2.3.3.dev0/docs/platform-features/email.md +0 -138
- erispulse-2.3.3.dev0/docs/platform-features/maintain-notes.md +0 -144
- erispulse-2.3.3.dev0/docs/platform-features/onebot11.md +0 -261
- erispulse-2.3.3.dev0/docs/platform-features/onebot12.md +0 -339
- erispulse-2.3.3.dev0/docs/platform-features/telegram.md +0 -139
- erispulse-2.3.3.dev0/docs/platform-features/yunhu.md +0 -153
- erispulse-2.3.3.dev0/docs/quick-start.md +0 -149
- erispulse-2.3.3.dev0/docs/standards/README.md +0 -19
- erispulse-2.3.3.dev0/docs/standards/api-response.md +0 -109
- erispulse-2.3.3.dev0/docs/standards/event-conversion.md +0 -194
- erispulse-2.3.3.dev0/docs/styleguide/README.md +0 -5
- erispulse-2.3.3.dev0/docs/styleguide/docstring_spec.md +0 -95
- erispulse-2.3.3.dev0/examples/example-adapter/LICENSE +0 -21
- erispulse-2.3.3.dev0/examples/example-adapter/MyAdapter/Converter.py +0 -38
- erispulse-2.3.3.dev0/examples/example-adapter/MyAdapter/Core.py +0 -141
- erispulse-2.3.3.dev0/examples/example-adapter/MyAdapter/__init__.py +0 -7
- erispulse-2.3.3.dev0/examples/example-adapter/README.md +0 -0
- erispulse-2.3.3.dev0/examples/example-adapter/pyproject.toml +0 -17
- erispulse-2.3.3.dev0/examples/example-cli-module/LICENSE +0 -21
- erispulse-2.3.3.dev0/examples/example-cli-module/README.md +0 -0
- erispulse-2.3.3.dev0/examples/example-cli-module/my_cli_module/__init__.py +0 -1
- erispulse-2.3.3.dev0/examples/example-cli-module/my_cli_module/cli.py +0 -61
- erispulse-2.3.3.dev0/examples/example-cli-module/pyproject.toml +0 -18
- erispulse-2.3.3.dev0/examples/example-module/LICENSE +0 -21
- erispulse-2.3.3.dev0/examples/example-module/MyModule/Core.py +0 -177
- erispulse-2.3.3.dev0/examples/example-module/MyModule/__init__.py +0 -1
- erispulse-2.3.3.dev0/examples/example-module/README.md +0 -29
- erispulse-2.3.3.dev0/examples/example-module/pyproject.toml +0 -17
- erispulse-2.3.3.dev0/packages.json +0 -258
- erispulse-2.3.3.dev0/scripts/install/install.ps1 +0 -339
- erispulse-2.3.3.dev0/scripts/install/install.sh +0 -271
- erispulse-2.3.3.dev0/src/ErisPulse/Core/ux.py +0 -635
- erispulse-2.3.3.dev0/src/ErisPulse/utils/cli.py +0 -1097
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/.gitignore +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Bases/__init__.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Bases/module.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/__init__.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/base.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/command.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/exceptions.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/message.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/meta.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/notice.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/Event/request.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/_self_config.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/adapter.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/config.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/exceptions.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/logger.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/module.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/router.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/Core/storage.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/__main__.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/utils/console.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/utils/package_manager.py +0 -0
- {erispulse-2.3.3.dev0 → erispulse-2.3.4.dev0}/src/ErisPulse/utils/reload_handler.py +0 -0
|
@@ -30,8 +30,8 @@ This SDK's core adapter standardization layer strictly follows OneBot12 specific
|
|
|
30
30
|
|
|
31
31
|
This ensures consistent behavior and interoperability across all adapter implementations.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
We extend our gratitude to all developers and authors who contribute to the open-source community.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Please respect the efforts of every open-source author. By using, modifying, or distributing this software, you commit to strictly adhering to the relevant license terms and preserving all original copyright notices.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
The core of the open-source spirit lies in sharing, collaboration, and respect. Through this project, we hope to carry forward this spirit and contribute to the development of the open-source community.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ErisPulse
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4.dev0
|
|
4
4
|
Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
|
|
5
5
|
Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>
|
|
6
6
|
License: MIT License
|
|
@@ -35,11 +35,11 @@ License: MIT License
|
|
|
35
35
|
|
|
36
36
|
This ensures consistent behavior and interoperability across all adapter implementations.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
We extend our gratitude to all developers and authors who contribute to the open-source community.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Please respect the efforts of every open-source author. By using, modifying, or distributing this software, you commit to strictly adhering to the relevant license terms and preserving all original copyright notices.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
The core of the open-source spirit lies in sharing, collaboration, and respect. Through this project, we hope to carry forward this spirit and contribute to the development of the open-source community.
|
|
43
43
|
License-File: LICENSE
|
|
44
44
|
Classifier: Development Status :: 5 - Production/Stable
|
|
45
45
|
Classifier: Intended Audience :: Developers
|
|
@@ -58,6 +58,7 @@ Requires-Dist: colorama
|
|
|
58
58
|
Requires-Dist: fastapi>=0.116.1
|
|
59
59
|
Requires-Dist: hypercorn>=0.14.0
|
|
60
60
|
Requires-Dist: packaging>=25.0
|
|
61
|
+
Requires-Dist: pip
|
|
61
62
|
Requires-Dist: pydantic>=2.10.6
|
|
62
63
|
Requires-Dist: python-multipart>=0.0.20
|
|
63
64
|
Requires-Dist: rich
|
|
@@ -146,21 +147,6 @@ uv pip install -e .
|
|
|
146
147
|
python -c "from ErisPulse import sdk; sdk.init()"
|
|
147
148
|
```
|
|
148
149
|
|
|
149
|
-
### 5. 运行测试
|
|
150
|
-
|
|
151
|
-
我们提供了一个交互式测试脚本,可以帮助您快速验证SDK功能:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
uv run devs/test.py
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
测试功能包括:
|
|
158
|
-
- 日志系统测试
|
|
159
|
-
- 环境配置测试
|
|
160
|
-
- 错误管理测试
|
|
161
|
-
- 工具函数测试
|
|
162
|
-
- 适配器功能测试
|
|
163
|
-
|
|
164
150
|
## 项目结构
|
|
165
151
|
|
|
166
152
|
```
|
|
@@ -191,7 +177,7 @@ ErisPulse/
|
|
|
191
177
|
通过 [社区讨论](https://github.com/ErisPulse/ErisPulse/discussions) 提出新想法
|
|
192
178
|
|
|
193
179
|
3. 代码贡献
|
|
194
|
-
提交 Pull Request 前请阅读我们的 [代码风格](docs/
|
|
180
|
+
提交 Pull Request 前请阅读我们的 [代码风格](docs/styleguide/docstring_spec.md) 以及 [贡献指南](CONTRIBUTING.md)
|
|
195
181
|
|
|
196
182
|
4. 文档改进
|
|
197
183
|
帮助完善文档和示例代码
|
|
@@ -79,21 +79,6 @@ uv pip install -e .
|
|
|
79
79
|
python -c "from ErisPulse import sdk; sdk.init()"
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
### 5. 运行测试
|
|
83
|
-
|
|
84
|
-
我们提供了一个交互式测试脚本,可以帮助您快速验证SDK功能:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
uv run devs/test.py
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
测试功能包括:
|
|
91
|
-
- 日志系统测试
|
|
92
|
-
- 环境配置测试
|
|
93
|
-
- 错误管理测试
|
|
94
|
-
- 工具函数测试
|
|
95
|
-
- 适配器功能测试
|
|
96
|
-
|
|
97
82
|
## 项目结构
|
|
98
83
|
|
|
99
84
|
```
|
|
@@ -124,7 +109,7 @@ ErisPulse/
|
|
|
124
109
|
通过 [社区讨论](https://github.com/ErisPulse/ErisPulse/discussions) 提出新想法
|
|
125
110
|
|
|
126
111
|
3. 代码贡献
|
|
127
|
-
提交 Pull Request 前请阅读我们的 [代码风格](docs/
|
|
112
|
+
提交 Pull Request 前请阅读我们的 [代码风格](docs/styleguide/docstring_spec.md) 以及 [贡献指南](CONTRIBUTING.md)
|
|
128
113
|
|
|
129
114
|
4. 文档改进
|
|
130
115
|
帮助完善文档和示例代码
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ErisPulse"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.4-dev.0"
|
|
8
8
|
description = "ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -29,6 +29,7 @@ classifiers = [
|
|
|
29
29
|
]
|
|
30
30
|
|
|
31
31
|
dependencies = [
|
|
32
|
+
"pip", # 显式声明,防止部分情况下cli报错
|
|
32
33
|
"rich",
|
|
33
34
|
"colorama",
|
|
34
35
|
"aiohttp",
|
|
@@ -51,6 +52,18 @@ epsdk-cli = "ErisPulse.__main__:main"
|
|
|
51
52
|
[tool.hatch]
|
|
52
53
|
project.root = "src"
|
|
53
54
|
|
|
55
|
+
[tool.hatch.build.targets.wheel]
|
|
56
|
+
packages = ["src/ErisPulse"]
|
|
57
|
+
|
|
58
|
+
[tool.hatch.build.targets.wheel.shared-data]
|
|
59
|
+
"stubs/ErisPulse" = "ErisPulse-stubs/ErisPulse"
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.sdist]
|
|
62
|
+
include = [
|
|
63
|
+
"/src/ErisPulse",
|
|
64
|
+
"/stubs/ErisPulse",
|
|
65
|
+
]
|
|
66
|
+
|
|
54
67
|
[tool.ruff]
|
|
55
68
|
target-version = "py310"
|
|
56
69
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for __init__.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 基础模块
|
|
9
|
+
|
|
10
|
+
提供核心基类定义,包括适配器和模块基类
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from .adapter import SendDSL, BaseAdapter
|
|
14
|
+
from .module import BaseModule
|
|
@@ -72,7 +72,19 @@ class SendDSL:
|
|
|
72
72
|
>>> adapter.Send.To("123").Using("bot1").Text("Hello") # 支持乱序
|
|
73
73
|
"""
|
|
74
74
|
return self.__class__(self._adapter, self._target_type, self._target_id, account_id)
|
|
75
|
-
|
|
75
|
+
|
|
76
|
+
def Account(self, account_id: Union[str, int]) -> 'SendDSL':
|
|
77
|
+
"""
|
|
78
|
+
设置发送账号
|
|
79
|
+
|
|
80
|
+
:param _account_id: 发送账号
|
|
81
|
+
:return: SendDSL实例
|
|
82
|
+
|
|
83
|
+
:example:
|
|
84
|
+
>>> adapter.Send.Account("bot1").To("123").Text("Hello")
|
|
85
|
+
>>> adapter.Send.To("123").Account("bot1").Text("Hello") # 支持乱序
|
|
86
|
+
"""
|
|
87
|
+
return self.__class__(self._adapter, self._target_type, self._target_id, account_id)
|
|
76
88
|
|
|
77
89
|
class BaseAdapter:
|
|
78
90
|
"""
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for adapter.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 适配器基础模块
|
|
9
|
+
|
|
10
|
+
提供适配器和消息发送DSL的基类实现
|
|
11
|
+
|
|
12
|
+
{!--< tips >!--}
|
|
13
|
+
1. 用于实现与不同平台的交互接口
|
|
14
|
+
2. 提供统一的消息发送DSL风格接口
|
|
15
|
+
{!--< /tips >!--}
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import asyncio
|
|
19
|
+
from typing import Any, Optional, Union, Awaitable
|
|
20
|
+
|
|
21
|
+
class SendDSL:
|
|
22
|
+
"""
|
|
23
|
+
消息发送DSL基类
|
|
24
|
+
|
|
25
|
+
用于实现 Send.To(...).Func(...) 风格的链式调用接口
|
|
26
|
+
|
|
27
|
+
{!--< tips >!--}
|
|
28
|
+
1. 子类应实现具体的消息发送方法(如Text, Image等)
|
|
29
|
+
2. 通过__getattr__实现动态方法调用
|
|
30
|
+
{!--< /tips >!--}
|
|
31
|
+
"""
|
|
32
|
+
def __init__(self: None, adapter: BaseAdapter, target_type: Optional[str] = ..., target_id: Optional[str] = ..., account_id: Optional[str] = ...) -> ...:
|
|
33
|
+
"""
|
|
34
|
+
初始化DSL发送器
|
|
35
|
+
|
|
36
|
+
:param adapter: 所属适配器实例
|
|
37
|
+
:param target_type: 目标类型(可选)
|
|
38
|
+
:param target_id: 目标ID(可选)
|
|
39
|
+
:param _account_id: 发送账号(可选)
|
|
40
|
+
"""
|
|
41
|
+
...
|
|
42
|
+
def To(self: object, target_type: str = ..., target_id: Union[(str, int)] = ...) -> SendDSL:
|
|
43
|
+
"""
|
|
44
|
+
设置消息目标
|
|
45
|
+
|
|
46
|
+
:param target_type: 目标类型(可选)
|
|
47
|
+
:param target_id: 目标ID(可选)
|
|
48
|
+
:return: SendDSL实例
|
|
49
|
+
|
|
50
|
+
:example:
|
|
51
|
+
>>> adapter.Send.To("user", "123").Text("Hello")
|
|
52
|
+
>>> adapter.Send.To("123").Text("Hello") # 简化形式
|
|
53
|
+
"""
|
|
54
|
+
...
|
|
55
|
+
def Using(self: object, account_id: Union[(str, int)]) -> SendDSL:
|
|
56
|
+
"""
|
|
57
|
+
设置发送账号
|
|
58
|
+
|
|
59
|
+
:param _account_id: 发送账号
|
|
60
|
+
:return: SendDSL实例
|
|
61
|
+
|
|
62
|
+
:example:
|
|
63
|
+
>>> adapter.Send.Using("bot1").To("123").Text("Hello")
|
|
64
|
+
>>> adapter.Send.To("123").Using("bot1").Text("Hello") # 支持乱序
|
|
65
|
+
"""
|
|
66
|
+
...
|
|
67
|
+
def Account(self: object, account_id: Union[(str, int)]) -> SendDSL:
|
|
68
|
+
"""
|
|
69
|
+
设置发送账号
|
|
70
|
+
|
|
71
|
+
:param _account_id: 发送账号
|
|
72
|
+
:return: SendDSL实例
|
|
73
|
+
|
|
74
|
+
:example:
|
|
75
|
+
>>> adapter.Send.Account("bot1").To("123").Text("Hello")
|
|
76
|
+
>>> adapter.Send.To("123").Account("bot1").Text("Hello") # 支持乱序
|
|
77
|
+
"""
|
|
78
|
+
...
|
|
79
|
+
|
|
80
|
+
class BaseAdapter:
|
|
81
|
+
"""
|
|
82
|
+
适配器基类
|
|
83
|
+
|
|
84
|
+
提供与外部平台交互的标准接口,子类必须实现必要方法
|
|
85
|
+
|
|
86
|
+
{!--< tips >!--}
|
|
87
|
+
1. 必须实现call_api, start和shutdown方法
|
|
88
|
+
2. 可以自定义Send类实现平台特定的消息发送逻辑
|
|
89
|
+
3. 通过on装饰器注册事件处理器
|
|
90
|
+
4. 支持OneBot12协议的事件处理
|
|
91
|
+
{!--< /tips >!--}
|
|
92
|
+
"""
|
|
93
|
+
def __init__(self: None) -> ...:
|
|
94
|
+
...
|
|
95
|
+
async def call_api(self: object, endpoint: str, **params: Any) -> Any:
|
|
96
|
+
"""
|
|
97
|
+
调用平台API的抽象方法
|
|
98
|
+
|
|
99
|
+
:param endpoint: API端点
|
|
100
|
+
:param params: API参数
|
|
101
|
+
:return: API调用结果
|
|
102
|
+
:raises NotImplementedError: 必须由子类实现
|
|
103
|
+
"""
|
|
104
|
+
...
|
|
105
|
+
async def start(self: object) -> None:
|
|
106
|
+
"""
|
|
107
|
+
启动适配器的抽象方法
|
|
108
|
+
|
|
109
|
+
:raises NotImplementedError: 必须由子类实现
|
|
110
|
+
"""
|
|
111
|
+
...
|
|
112
|
+
async def shutdown(self: object) -> None:
|
|
113
|
+
"""
|
|
114
|
+
关闭适配器的抽象方法
|
|
115
|
+
|
|
116
|
+
:raises NotImplementedError: 必须由子类实现
|
|
117
|
+
"""
|
|
118
|
+
...
|
|
119
|
+
async def emit(self: object) -> None:
|
|
120
|
+
...
|
|
121
|
+
def send(self: object, target_type: str, target_id: str, message: Any, **kwargs: Any) -> asyncio.Task:
|
|
122
|
+
"""
|
|
123
|
+
发送消息的便捷方法,返回一个 asyncio Task
|
|
124
|
+
|
|
125
|
+
:param target_type: 目标类型
|
|
126
|
+
:param target_id: 目标ID
|
|
127
|
+
:param message: 消息内容
|
|
128
|
+
:param kwargs: 其他参数
|
|
129
|
+
- method: 发送方法名(默认为"Text")
|
|
130
|
+
:return: asyncio.Task 对象,用户可以自主决定是否等待
|
|
131
|
+
|
|
132
|
+
:raises AttributeError: 当发送方法不存在时抛出
|
|
133
|
+
|
|
134
|
+
:example:
|
|
135
|
+
>>> task = adapter.send("user", "123", "Hello")
|
|
136
|
+
>>> # 用户可以选择等待: result = await task
|
|
137
|
+
>>> # 或者不等待让其在后台执行
|
|
138
|
+
>>> await adapter.send("group", "456", "Hello", method="Markdown") # 直接等待
|
|
139
|
+
"""
|
|
140
|
+
...
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for module.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 模块基础模块
|
|
9
|
+
|
|
10
|
+
提供模块基类定义和标准接口
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
class BaseModule:
|
|
14
|
+
"""
|
|
15
|
+
模块基类
|
|
16
|
+
|
|
17
|
+
提供模块加载和卸载的标准接口
|
|
18
|
+
"""
|
|
19
|
+
def should_eager_load() -> bool:
|
|
20
|
+
"""
|
|
21
|
+
模块是否应该在启动时加载
|
|
22
|
+
默认为False(即懒加载)
|
|
23
|
+
|
|
24
|
+
:return: 是否应该在启动时加载
|
|
25
|
+
"""
|
|
26
|
+
...
|
|
27
|
+
async def on_load(self: object, event: dict) -> bool:
|
|
28
|
+
"""
|
|
29
|
+
当模块被加载时调用
|
|
30
|
+
|
|
31
|
+
:param event: 事件内容
|
|
32
|
+
:return: 处理结果
|
|
33
|
+
|
|
34
|
+
{!--< tips >!--}
|
|
35
|
+
其中,event事件内容为:
|
|
36
|
+
`{ "module_name": "模块名" }`
|
|
37
|
+
{!--< /tips >!--}
|
|
38
|
+
"""
|
|
39
|
+
...
|
|
40
|
+
async def on_unload(self: object, event: dict) -> bool:
|
|
41
|
+
"""
|
|
42
|
+
当模块被卸载时调用
|
|
43
|
+
|
|
44
|
+
:param event: 事件内容
|
|
45
|
+
:return: 处理结果
|
|
46
|
+
|
|
47
|
+
{!--< tips >!--}
|
|
48
|
+
其中,event事件内容为:
|
|
49
|
+
`{ "module_name": "模块名" }`
|
|
50
|
+
{!--< /tips >!--}
|
|
51
|
+
"""
|
|
52
|
+
...
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for __init__.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 事件处理模块
|
|
9
|
+
|
|
10
|
+
提供统一的事件处理接口,支持命令、消息、通知、请求和元事件处理
|
|
11
|
+
|
|
12
|
+
{!--< tips >!--}
|
|
13
|
+
1. 所有事件处理都基于OneBot12标准事件格式
|
|
14
|
+
2. 通过装饰器方式注册事件处理器
|
|
15
|
+
3. 支持优先级和条件过滤
|
|
16
|
+
{!--< /tips >!--}
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from .command import command
|
|
20
|
+
from .message import message
|
|
21
|
+
from .notice import notice
|
|
22
|
+
from .request import request
|
|
23
|
+
from .meta import meta
|
|
24
|
+
from .wrapper import Event
|
|
25
|
+
from . import exceptions
|
|
26
|
+
from .. import config
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for base.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 事件处理基础模块
|
|
9
|
+
|
|
10
|
+
提供事件处理的核心功能,包括事件注册和处理
|
|
11
|
+
|
|
12
|
+
{!--< tips >!--}
|
|
13
|
+
1. 所有事件处理都基于OneBot12标准事件格式
|
|
14
|
+
2. 通过适配器系统进行事件分发和接收
|
|
15
|
+
{!--< /tips >!--}
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from .. import adapter, logger
|
|
19
|
+
from typing import Callable, Any, Dict, List
|
|
20
|
+
import asyncio
|
|
21
|
+
from .wrapper import Event
|
|
22
|
+
|
|
23
|
+
class BaseEventHandler:
|
|
24
|
+
"""
|
|
25
|
+
基础事件处理器
|
|
26
|
+
|
|
27
|
+
提供事件处理的基本功能,包括处理器注册和注销
|
|
28
|
+
"""
|
|
29
|
+
def __init__(self: None, event_type: str, module_name: str = ...) -> ...:
|
|
30
|
+
"""
|
|
31
|
+
初始化事件处理器
|
|
32
|
+
|
|
33
|
+
:param event_type: 事件类型
|
|
34
|
+
:param module_name: 模块名称
|
|
35
|
+
"""
|
|
36
|
+
...
|
|
37
|
+
def register(self: object, handler: Callable, priority: int = ..., condition: Callable = ...) -> ...:
|
|
38
|
+
"""
|
|
39
|
+
注册事件处理器
|
|
40
|
+
|
|
41
|
+
:param handler: 事件处理器函数
|
|
42
|
+
:param priority: 处理器优先级,数值越小优先级越高
|
|
43
|
+
:param condition: 处理器条件函数,返回True时才会执行处理器
|
|
44
|
+
"""
|
|
45
|
+
...
|
|
46
|
+
def unregister(self: object, handler: Callable) -> bool:
|
|
47
|
+
"""
|
|
48
|
+
注销事件处理器
|
|
49
|
+
|
|
50
|
+
:param handler: 要注销的事件处理器
|
|
51
|
+
:return: 是否成功注销
|
|
52
|
+
"""
|
|
53
|
+
...
|
|
54
|
+
def __call__(self: object, priority: int = ..., condition: Callable = ...) -> ...:
|
|
55
|
+
"""
|
|
56
|
+
装饰器方式注册事件处理器
|
|
57
|
+
|
|
58
|
+
:param priority: 处理器优先级
|
|
59
|
+
:param condition: 处理器条件函数
|
|
60
|
+
:return: 装饰器函数
|
|
61
|
+
"""
|
|
62
|
+
...
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for command.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 命令处理模块
|
|
9
|
+
|
|
10
|
+
提供基于装饰器的命令注册和处理功能
|
|
11
|
+
|
|
12
|
+
{!--< tips >!--}
|
|
13
|
+
1. 支持命令别名和命令组
|
|
14
|
+
2. 支持命令权限控制
|
|
15
|
+
3. 支持命令帮助系统
|
|
16
|
+
4. 支持等待用户回复交互
|
|
17
|
+
{!--< /tips >!--}
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from .base import BaseEventHandler
|
|
21
|
+
from .. import adapter, config, logger
|
|
22
|
+
from typing import Callable, Union, List, Dict, Any, Optional, Awaitable
|
|
23
|
+
import asyncio
|
|
24
|
+
|
|
25
|
+
class CommandHandler:
|
|
26
|
+
"""
|
|
27
|
+
命令处理器
|
|
28
|
+
|
|
29
|
+
提供命令注册、处理和管理功能
|
|
30
|
+
"""
|
|
31
|
+
def __init__(self: None) -> ...:
|
|
32
|
+
...
|
|
33
|
+
def __call__(self: object, name: Union[(str, List[str])] = ..., aliases: List[str] = ..., group: str = ..., priority: int = ..., permission: Callable = ..., help: str = ..., usage: str = ..., hidden: bool = ...) -> ...:
|
|
34
|
+
"""
|
|
35
|
+
命令装饰器
|
|
36
|
+
|
|
37
|
+
:param name: 命令名称,可以是字符串或字符串列表
|
|
38
|
+
:param aliases: 命令别名列表
|
|
39
|
+
:param group: 命令组名称
|
|
40
|
+
:param priority: 处理器优先级
|
|
41
|
+
:param permission: 权限检查函数,返回True时允许执行命令
|
|
42
|
+
:param help: 命令帮助信息
|
|
43
|
+
:param usage: 命令使用方法
|
|
44
|
+
:param hidden: 是否在帮助中隐藏命令
|
|
45
|
+
:return: 装饰器函数
|
|
46
|
+
"""
|
|
47
|
+
...
|
|
48
|
+
def unregister(self: object, handler: Callable) -> bool:
|
|
49
|
+
"""
|
|
50
|
+
注销命令处理器
|
|
51
|
+
|
|
52
|
+
:param handler: 要注销的命令处理器
|
|
53
|
+
:return: 是否成功注销
|
|
54
|
+
"""
|
|
55
|
+
...
|
|
56
|
+
async def wait_reply(self: object, event: Dict[(str, Any)], prompt: str = ..., timeout: float = ..., callback: Callable[([Dict[(str, Any)]], Awaitable[Any])] = ..., validator: Callable[([Dict[(str, Any)]], bool)] = ...) -> Optional[Dict[(str, Any)]]:
|
|
57
|
+
"""
|
|
58
|
+
等待用户回复
|
|
59
|
+
|
|
60
|
+
:param event: 原始事件数据
|
|
61
|
+
:param prompt: 提示消息,如果提供会发送给用户
|
|
62
|
+
:param timeout: 等待超时时间(秒)
|
|
63
|
+
:param callback: 回调函数,当收到回复时执行
|
|
64
|
+
:param validator: 验证函数,用于验证回复是否有效
|
|
65
|
+
:return: 用户回复的事件数据,如果超时则返回None
|
|
66
|
+
"""
|
|
67
|
+
...
|
|
68
|
+
async def _check_pending_reply(self: object, event: Dict[(str, Any)]) -> ...:
|
|
69
|
+
"""
|
|
70
|
+
检查是否是等待回复的消息
|
|
71
|
+
|
|
72
|
+
:param event: 消息事件数据
|
|
73
|
+
"""
|
|
74
|
+
...
|
|
75
|
+
def get_command(self: object, name: str) -> Optional[Dict]:
|
|
76
|
+
"""
|
|
77
|
+
获取命令信息
|
|
78
|
+
|
|
79
|
+
:param name: 命令名称
|
|
80
|
+
:return: 命令信息字典,如果不存在则返回None
|
|
81
|
+
"""
|
|
82
|
+
...
|
|
83
|
+
def get_commands(self: object) -> Dict[(str, Dict)]:
|
|
84
|
+
"""
|
|
85
|
+
获取所有命令
|
|
86
|
+
|
|
87
|
+
:return: 命令信息字典
|
|
88
|
+
"""
|
|
89
|
+
...
|
|
90
|
+
def get_group_commands(self: object, group: str) -> List[str]:
|
|
91
|
+
"""
|
|
92
|
+
获取命令组中的命令
|
|
93
|
+
|
|
94
|
+
:param group: 命令组名称
|
|
95
|
+
:return: 命令名称列表
|
|
96
|
+
"""
|
|
97
|
+
...
|
|
98
|
+
def get_visible_commands(self: object) -> Dict[(str, Dict)]:
|
|
99
|
+
"""
|
|
100
|
+
获取所有可见命令(非隐藏命令)
|
|
101
|
+
|
|
102
|
+
:return: 可见命令信息字典
|
|
103
|
+
"""
|
|
104
|
+
...
|
|
105
|
+
def help(self: object, command_name: str = ..., show_hidden: bool = ...) -> str:
|
|
106
|
+
"""
|
|
107
|
+
生成帮助信息
|
|
108
|
+
|
|
109
|
+
:param command_name: 命令名称,如果为None则生成所有命令的帮助
|
|
110
|
+
:param show_hidden: 是否显示隐藏命令
|
|
111
|
+
:return: 帮助信息字符串
|
|
112
|
+
"""
|
|
113
|
+
...
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
#
|
|
3
|
+
# Auto-generated type stub for exceptions.py
|
|
4
|
+
# DO NOT EDIT MANUALLY - Generated by generate-type-stubs.py
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
ErisPulse 事件系统异常处理模块
|
|
9
|
+
|
|
10
|
+
提供事件系统中可能发生的各种异常类型定义
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
class EventException(Exception):
|
|
14
|
+
"""
|
|
15
|
+
事件系统基础异常
|
|
16
|
+
|
|
17
|
+
所有事件系统相关异常的基类
|
|
18
|
+
"""
|
|
19
|
+
...
|
|
20
|
+
|
|
21
|
+
class CommandException(EventException):
|
|
22
|
+
"""
|
|
23
|
+
命令处理异常
|
|
24
|
+
|
|
25
|
+
当命令处理过程中发生错误时抛出
|
|
26
|
+
"""
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
class EventHandlerException(EventException):
|
|
30
|
+
"""
|
|
31
|
+
事件处理器异常
|
|
32
|
+
|
|
33
|
+
当事件处理器执行过程中发生错误时抛出
|
|
34
|
+
"""
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
class EventNotFoundException(EventException):
|
|
38
|
+
"""
|
|
39
|
+
事件未找到异常
|
|
40
|
+
|
|
41
|
+
当尝试获取不存在的事件处理器时抛出
|
|
42
|
+
"""
|
|
43
|
+
...
|