ncatbot5 5.0.0rc7__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 (473) hide show
  1. ncatbot5-5.0.0rc7/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
  2. ncatbot5-5.0.0rc7/.github/workflows/pypi-publish.yml +63 -0
  3. ncatbot5-5.0.0rc7/.github/workflows/pytest.yml +31 -0
  4. ncatbot5-5.0.0rc7/.gitignore +182 -0
  5. ncatbot5-5.0.0rc7/.pre-commit-config.yaml +32 -0
  6. ncatbot5-5.0.0rc7/CONTRIBUTING.md +147 -0
  7. ncatbot5-5.0.0rc7/LICENSE +32 -0
  8. ncatbot5-5.0.0rc7/MANIFEST.in +7 -0
  9. ncatbot5-5.0.0rc7/NOTICE +5 -0
  10. ncatbot5-5.0.0rc7/PKG-INFO +125 -0
  11. ncatbot5-5.0.0rc7/README.md +78 -0
  12. ncatbot5-5.0.0rc7/assets/background.png +0 -0
  13. ncatbot5-5.0.0rc7/config.yaml +24 -0
  14. ncatbot5-5.0.0rc7/examples/quick_start/backend_example.py +14 -0
  15. ncatbot5-5.0.0rc7/examples/quick_start/frontend_example.py +22 -0
  16. ncatbot5-5.0.0rc7/examples/tutorial/poke.py +15 -0
  17. ncatbot5-5.0.0rc7/main.py +31 -0
  18. ncatbot5-5.0.0rc7/ncatbot/__init__.py +18 -0
  19. ncatbot5-5.0.0rc7/ncatbot/cli/__init__.py +0 -0
  20. ncatbot5-5.0.0rc7/ncatbot/cli/commands/__init__.py +23 -0
  21. ncatbot5-5.0.0rc7/ncatbot/cli/commands/config_commands.py +76 -0
  22. ncatbot5-5.0.0rc7/ncatbot/cli/commands/info_commands.py +142 -0
  23. ncatbot5-5.0.0rc7/ncatbot/cli/commands/plugin_commands.py +198 -0
  24. ncatbot5-5.0.0rc7/ncatbot/cli/commands/registry.py +178 -0
  25. ncatbot5-5.0.0rc7/ncatbot/cli/commands/system_commands.py +83 -0
  26. ncatbot5-5.0.0rc7/ncatbot/cli/main.py +110 -0
  27. ncatbot5-5.0.0rc7/ncatbot/cli/utils/__init__.py +9 -0
  28. ncatbot5-5.0.0rc7/ncatbot/cli/utils/cli_exceptions.py +4 -0
  29. ncatbot5-5.0.0rc7/ncatbot/cli/utils/colors.py +180 -0
  30. ncatbot5-5.0.0rc7/ncatbot/cli/utils/constants.py +4 -0
  31. ncatbot5-5.0.0rc7/ncatbot/core/__init__.py +37 -0
  32. ncatbot5-5.0.0rc7/ncatbot/core/adapter/__init__.py +5 -0
  33. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/__init__.py +46 -0
  34. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/auth.py +304 -0
  35. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/config_manager.py +195 -0
  36. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/platform.py +363 -0
  37. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/service.py +220 -0
  38. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/utils.py +183 -0
  39. ncatbot5-5.0.0rc7/ncatbot/core/adapter/nc/websocket.py +193 -0
  40. ncatbot5-5.0.0rc7/ncatbot/core/api/__init__.py +10 -0
  41. ncatbot5-5.0.0rc7/ncatbot/core/api/api.py +98 -0
  42. ncatbot5-5.0.0rc7/ncatbot/core/api/api_account.py +414 -0
  43. ncatbot5-5.0.0rc7/ncatbot/core/api/api_account.pyi +93 -0
  44. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/__init__.py +84 -0
  45. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/__init__.pyi +275 -0
  46. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/admin.py +214 -0
  47. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/file.py +307 -0
  48. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/info.py +231 -0
  49. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/member.py +166 -0
  50. ncatbot5-5.0.0rc7/ncatbot/core/api/api_group/models.py +270 -0
  51. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/__init__.py +93 -0
  52. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/__init__.pyi +390 -0
  53. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/common.py +124 -0
  54. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/forward.py +244 -0
  55. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/group_music.py +113 -0
  56. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/group_send.py +197 -0
  57. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/private_music.py +108 -0
  58. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/private_send.py +214 -0
  59. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/retrieve.py +234 -0
  60. ncatbot5-5.0.0rc7/ncatbot/core/api/api_message/validation.py +72 -0
  61. ncatbot5-5.0.0rc7/ncatbot/core/api/api_private.py +145 -0
  62. ncatbot5-5.0.0rc7/ncatbot/core/api/api_private.pyi +63 -0
  63. ncatbot5-5.0.0rc7/ncatbot/core/api/api_support.py +236 -0
  64. ncatbot5-5.0.0rc7/ncatbot/core/api/api_support.pyi +50 -0
  65. ncatbot5-5.0.0rc7/ncatbot/core/api/client.py +85 -0
  66. ncatbot5-5.0.0rc7/ncatbot/core/api/utils/__init__.py +26 -0
  67. ncatbot5-5.0.0rc7/ncatbot/core/api/utils/component.py +162 -0
  68. ncatbot5-5.0.0rc7/ncatbot/core/api/utils/errors.py +30 -0
  69. ncatbot5-5.0.0rc7/ncatbot/core/api/utils/status.py +72 -0
  70. ncatbot5-5.0.0rc7/ncatbot/core/api/utils/sync_runner.py +224 -0
  71. ncatbot5-5.0.0rc7/ncatbot/core/api/utils/validation.py +63 -0
  72. ncatbot5-5.0.0rc7/ncatbot/core/client/__init__.py +33 -0
  73. ncatbot5-5.0.0rc7/ncatbot/core/client/client.py +151 -0
  74. ncatbot5-5.0.0rc7/ncatbot/core/client/dispatcher.py +106 -0
  75. ncatbot5-5.0.0rc7/ncatbot/core/client/event_bus.py +305 -0
  76. ncatbot5-5.0.0rc7/ncatbot/core/client/lifecycle.py +326 -0
  77. ncatbot5-5.0.0rc7/ncatbot/core/client/ncatbot_event.py +132 -0
  78. ncatbot5-5.0.0rc7/ncatbot/core/client/registry.py +308 -0
  79. ncatbot5-5.0.0rc7/ncatbot/core/event/__init__.py +30 -0
  80. ncatbot5-5.0.0rc7/ncatbot/core/event/context.py +37 -0
  81. ncatbot5-5.0.0rc7/ncatbot/core/event/enums.py +67 -0
  82. ncatbot5-5.0.0rc7/ncatbot/core/event/events.py +272 -0
  83. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/__init__.py +47 -0
  84. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/base.py +53 -0
  85. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/forward.py +111 -0
  86. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/media.py +45 -0
  87. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/message_array.py +247 -0
  88. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/misc.py +52 -0
  89. ncatbot5-5.0.0rc7/ncatbot/core/event/message_segments/primitives.py +43 -0
  90. ncatbot5-5.0.0rc7/ncatbot/core/event/mixins.py +75 -0
  91. ncatbot5-5.0.0rc7/ncatbot/core/event/models.py +56 -0
  92. ncatbot5-5.0.0rc7/ncatbot/core/event/parser.py +151 -0
  93. ncatbot5-5.0.0rc7/ncatbot/core/helper/__init__.py +3 -0
  94. ncatbot5-5.0.0rc7/ncatbot/core/helper/forward_constructor.py +93 -0
  95. ncatbot5-5.0.0rc7/ncatbot/core/service/__init__.py +23 -0
  96. ncatbot5-5.0.0rc7/ncatbot/core/service/base.py +101 -0
  97. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/__init__.py +29 -0
  98. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/file_watcher/__init__.py +9 -0
  99. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/file_watcher/service.py +248 -0
  100. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/message_router.py +145 -0
  101. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/plugin_config/__init__.py +17 -0
  102. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/plugin_config/persistence.py +295 -0
  103. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/plugin_config/service.py +268 -0
  104. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/plugin_config/types.py +171 -0
  105. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/plugin_data/__init__.py +5 -0
  106. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/plugin_data/service.py +150 -0
  107. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/__init__.py +10 -0
  108. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/client.py +250 -0
  109. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/constants.py +27 -0
  110. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/processor.py +263 -0
  111. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/result.py +29 -0
  112. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/service.py +194 -0
  113. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/preupload/utils.py +193 -0
  114. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/__init__.py +15 -0
  115. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/entity_manager.py +231 -0
  116. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/path.py +126 -0
  117. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/permission_assigner.py +72 -0
  118. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/permission_checker.py +75 -0
  119. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/service.py +272 -0
  120. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/storage.py +87 -0
  121. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/rbac/trie.py +117 -0
  122. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/time_task/__init__.py +14 -0
  123. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/time_task/executor.py +102 -0
  124. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/time_task/parser.py +124 -0
  125. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/time_task/service.py +267 -0
  126. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/__init__.py +24 -0
  127. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_runner.py +141 -0
  128. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/__init__.py +13 -0
  129. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/analyzer/__init__.py +8 -0
  130. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/analyzer/decorator_validator.py +283 -0
  131. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/analyzer/func_analyzer.py +47 -0
  132. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/analyzer/param_validator.py +197 -0
  133. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/analyzer/sig_validator.py +84 -0
  134. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/lexer/README.md +163 -0
  135. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/lexer/__init__.py +44 -0
  136. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/lexer/command_parser.py +182 -0
  137. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/lexer/message_tokenizer.py +83 -0
  138. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/lexer/tokenizer.py +254 -0
  139. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/registry/__init__.py +14 -0
  140. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/registry/decorators.py +142 -0
  141. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/registry/help_system.py +247 -0
  142. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/registry/registry.py +216 -0
  143. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/utils/__init__.py +42 -0
  144. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/utils/exceptions.py +335 -0
  145. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/command_system/utils/specs.py +125 -0
  146. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/executor.py +68 -0
  147. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/__init__.py +22 -0
  148. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/base.py +89 -0
  149. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/builtin.py +171 -0
  150. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/decorators.py +261 -0
  151. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/event_registry.py +73 -0
  152. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/registry.py +137 -0
  153. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/filter_system/validator.py +43 -0
  154. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/service.py +247 -0
  155. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/trigger/__init__.py +0 -0
  156. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/trigger/binder.py +254 -0
  157. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/trigger/preprocessor.py +65 -0
  158. ncatbot5-5.0.0rc7/ncatbot/core/service/builtin/unified_registry/trigger/resolver.py +118 -0
  159. ncatbot5-5.0.0rc7/ncatbot/core/service/manager.py +177 -0
  160. ncatbot5-5.0.0rc7/ncatbot/mcp/MCPconfig.json +11 -0
  161. ncatbot5-5.0.0rc7/ncatbot/mcp/__init__.py +0 -0
  162. ncatbot5-5.0.0rc7/ncatbot/mcp/config.yaml +24 -0
  163. ncatbot5-5.0.0rc7/ncatbot/mcp/main.py +274 -0
  164. ncatbot5-5.0.0rc7/ncatbot/mcp/readme.md +30 -0
  165. ncatbot5-5.0.0rc7/ncatbot/plugin_system/.DS_Store +0 -0
  166. ncatbot5-5.0.0rc7/ncatbot/plugin_system/__init__.py +42 -0
  167. ncatbot5-5.0.0rc7/ncatbot/plugin_system/base_plugin.py +173 -0
  168. ncatbot5-5.0.0rc7/ncatbot/plugin_system/builtin_mixin/__init__.py +10 -0
  169. ncatbot5-5.0.0rc7/ncatbot/plugin_system/builtin_mixin/config_mixin.py +172 -0
  170. ncatbot5-5.0.0rc7/ncatbot/plugin_system/builtin_mixin/ncatbot_plugin.py +130 -0
  171. ncatbot5-5.0.0rc7/ncatbot/plugin_system/builtin_mixin/time_task_mixin.py +232 -0
  172. ncatbot5-5.0.0rc7/ncatbot/plugin_system/builtin_plugin/__init__.py +5 -0
  173. ncatbot5-5.0.0rc7/ncatbot/plugin_system/builtin_plugin/system_manager.py +197 -0
  174. ncatbot5-5.0.0rc7/ncatbot/plugin_system/config.py +28 -0
  175. ncatbot5-5.0.0rc7/ncatbot/plugin_system/event.py +10 -0
  176. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/__init__.py +21 -0
  177. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/core.py +243 -0
  178. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/finder.py +199 -0
  179. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/__init__.py +31 -0
  180. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/__init__.py +67 -0
  181. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/base.py +54 -0
  182. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/migrator.py +122 -0
  183. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/presets.py +136 -0
  184. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/__init__.py +25 -0
  185. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/absolute_to_relative.py +94 -0
  186. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/decorator_replacement.py +139 -0
  187. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/deprecated_code_removal.py +198 -0
  188. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/import_replacement.py +152 -0
  189. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/selective_import_replacement.py +168 -0
  190. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/rules/symbol_rename.py +51 -0
  191. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/code_migrator/utils.py +61 -0
  192. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/hooks/migrate_hook.py +200 -0
  193. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/importer.py +407 -0
  194. ncatbot5-5.0.0rc7/ncatbot/plugin_system/loader/resolver.py +55 -0
  195. ncatbot5-5.0.0rc7/ncatbot/plugin_system/packhelper.py +43 -0
  196. ncatbot5-5.0.0rc7/ncatbot/plugin_system/pluginsys_err.py +161 -0
  197. ncatbot5-5.0.0rc7/ncatbot/utils/__init__.py +28 -0
  198. ncatbot5-5.0.0rc7/ncatbot/utils/assets/__init__.py +4 -0
  199. ncatbot5-5.0.0rc7/ncatbot/utils/assets/color.py +172 -0
  200. ncatbot5-5.0.0rc7/ncatbot/utils/assets/default_webui_config.py +251 -0
  201. ncatbot5-5.0.0rc7/ncatbot/utils/assets/literals.py +71 -0
  202. ncatbot5-5.0.0rc7/ncatbot/utils/assets/template_plugin/.gitignore +38 -0
  203. ncatbot5-5.0.0rc7/ncatbot/utils/assets/template_plugin/README.md +33 -0
  204. ncatbot5-5.0.0rc7/ncatbot/utils/assets/template_plugin/__init__.py +1 -0
  205. ncatbot5-5.0.0rc7/ncatbot/utils/assets/template_plugin/manifest.toml +11 -0
  206. ncatbot5-5.0.0rc7/ncatbot/utils/assets/template_plugin/plugin.py +37 -0
  207. ncatbot5-5.0.0rc7/ncatbot/utils/config/__init__.py +46 -0
  208. ncatbot5-5.0.0rc7/ncatbot/utils/config/manager.py +202 -0
  209. ncatbot5-5.0.0rc7/ncatbot/utils/config/models.py +206 -0
  210. ncatbot5-5.0.0rc7/ncatbot/utils/config/storage.py +47 -0
  211. ncatbot5-5.0.0rc7/ncatbot/utils/config/utils.py +24 -0
  212. ncatbot5-5.0.0rc7/ncatbot/utils/error.py +55 -0
  213. ncatbot5-5.0.0rc7/ncatbot/utils/logger.py +353 -0
  214. ncatbot5-5.0.0rc7/ncatbot/utils/network_io.py +167 -0
  215. ncatbot5-5.0.0rc7/ncatbot/utils/status.py +69 -0
  216. ncatbot5-5.0.0rc7/ncatbot/utils/testing/__init__.py +78 -0
  217. ncatbot5-5.0.0rc7/ncatbot/utils/testing/event_factory.py +313 -0
  218. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mixins.py +255 -0
  219. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/__init__.py +55 -0
  220. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/client.py +138 -0
  221. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/database/__init__.py +25 -0
  222. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/database/core.py +211 -0
  223. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/database/files.py +235 -0
  224. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/database/messages.py +197 -0
  225. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/database/models.py +186 -0
  226. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/__init__.py +9 -0
  227. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/account.py +87 -0
  228. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/base.py +142 -0
  229. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/file.py +134 -0
  230. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/group.py +125 -0
  231. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/message.py +147 -0
  232. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/handlers/upload.py +99 -0
  233. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/server.py +395 -0
  234. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/templates/__init__.py +36 -0
  235. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/templates/builder.py +231 -0
  236. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/templates/creators.py +116 -0
  237. ncatbot5-5.0.0rc7/ncatbot/utils/testing/mock_server/templates/presets.py +282 -0
  238. ncatbot5-5.0.0rc7/ncatbot/utils/testing/suite.py +200 -0
  239. ncatbot5-5.0.0rc7/ncatbot5.egg-info/PKG-INFO +125 -0
  240. ncatbot5-5.0.0rc7/ncatbot5.egg-info/SOURCES.txt +471 -0
  241. ncatbot5-5.0.0rc7/ncatbot5.egg-info/dependency_links.txt +1 -0
  242. ncatbot5-5.0.0rc7/ncatbot5.egg-info/requires.txt +37 -0
  243. ncatbot5-5.0.0rc7/ncatbot5.egg-info/top_level.txt +1 -0
  244. ncatbot5-5.0.0rc7/pyproject.toml +130 -0
  245. ncatbot5-5.0.0rc7/requirements.txt +56 -0
  246. ncatbot5-5.0.0rc7/setup.cfg +4 -0
  247. ncatbot5-5.0.0rc7/setup.py +5 -0
  248. ncatbot5-5.0.0rc7/test/cli/__init__.py +1 -0
  249. ncatbot5-5.0.0rc7/test/cli/conftest.py +77 -0
  250. ncatbot5-5.0.0rc7/test/cli/test_config_commands.py +108 -0
  251. ncatbot5-5.0.0rc7/test/cli/test_info_commands.py +127 -0
  252. ncatbot5-5.0.0rc7/test/cli/test_main.py +229 -0
  253. ncatbot5-5.0.0rc7/test/cli/test_plugin_commands.py +189 -0
  254. ncatbot5-5.0.0rc7/test/cli/test_registry.py +226 -0
  255. ncatbot5-5.0.0rc7/test/cli/test_system_commands.py +91 -0
  256. ncatbot5-5.0.0rc7/test/core/adapter/test_nc_platform.py +182 -0
  257. ncatbot5-5.0.0rc7/test/core/api/test_api_client.py +60 -0
  258. ncatbot5-5.0.0rc7/test/core/client/__init__.py +3 -0
  259. ncatbot5-5.0.0rc7/test/core/client/conftest.py +342 -0
  260. ncatbot5-5.0.0rc7/test/core/client/test_client.py +188 -0
  261. ncatbot5-5.0.0rc7/test/core/client/test_dispatcher.py +356 -0
  262. ncatbot5-5.0.0rc7/test/core/client/test_event_bus_publish.py +255 -0
  263. ncatbot5-5.0.0rc7/test/core/client/test_event_bus_subscribe.py +246 -0
  264. ncatbot5-5.0.0rc7/test/core/client/test_lifecycle.py +252 -0
  265. ncatbot5-5.0.0rc7/test/core/client/test_ncatbot_event.py +285 -0
  266. ncatbot5-5.0.0rc7/test/core/client/test_registry_core.py +143 -0
  267. ncatbot5-5.0.0rc7/test/core/client/test_registry_decorators.py +168 -0
  268. ncatbot5-5.0.0rc7/test/core/client/test_registry_handlers.py +245 -0
  269. ncatbot5-5.0.0rc7/test/core/event/README.md +309 -0
  270. ncatbot5-5.0.0rc7/test/core/event/conftest.py +349 -0
  271. ncatbot5-5.0.0rc7/test/core/event/events/__init__.py +1 -0
  272. ncatbot5-5.0.0rc7/test/core/event/events/conftest.py +115 -0
  273. ncatbot5-5.0.0rc7/test/core/event/events/test_context.py +136 -0
  274. ncatbot5-5.0.0rc7/test/core/event/events/test_enums.py +122 -0
  275. ncatbot5-5.0.0rc7/test/core/event/events/test_events_message.py +257 -0
  276. ncatbot5-5.0.0rc7/test/core/event/events/test_events_notice.py +234 -0
  277. ncatbot5-5.0.0rc7/test/core/event/events/test_events_request_meta.py +235 -0
  278. ncatbot5-5.0.0rc7/test/core/event/events/test_events_serialization.py +142 -0
  279. ncatbot5-5.0.0rc7/test/core/event/events/test_integration_flow.py +214 -0
  280. ncatbot5-5.0.0rc7/test/core/event/events/test_integration_real_data.py +232 -0
  281. ncatbot5-5.0.0rc7/test/core/event/events/test_mixins.py +247 -0
  282. ncatbot5-5.0.0rc7/test/core/event/events/test_models.py +193 -0
  283. ncatbot5-5.0.0rc7/test/core/event/events/test_parser.py +274 -0
  284. ncatbot5-5.0.0rc7/test/core/event/message_segments/__init__.py +1 -0
  285. ncatbot5-5.0.0rc7/test/core/event/message_segments/conftest.py +60 -0
  286. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_base.py +203 -0
  287. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_conftest.py +156 -0
  288. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_cq_parser.py +154 -0
  289. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_forward.py +254 -0
  290. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_integration.py +291 -0
  291. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_media.py +289 -0
  292. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_message_array_builder.py +166 -0
  293. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_message_array_filter.py +118 -0
  294. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_misc.py +311 -0
  295. ncatbot5-5.0.0rc7/test/core/event/message_segments/test_primitives.py +244 -0
  296. ncatbot5-5.0.0rc7/test/core/helper/__init__.py +1 -0
  297. ncatbot5-5.0.0rc7/test/core/helper/test_forward_constructor.py +256 -0
  298. ncatbot5-5.0.0rc7/test/core/service/__init__.py +1 -0
  299. ncatbot5-5.0.0rc7/test/core/service/test_config_service.py +348 -0
  300. ncatbot5-5.0.0rc7/test/core/service/test_config_types.py +288 -0
  301. ncatbot5-5.0.0rc7/test/core/service/test_plugin_data_service.py +298 -0
  302. ncatbot5-5.0.0rc7/test/core/service/test_preupload_processor.py +267 -0
  303. ncatbot5-5.0.0rc7/test/core/service/test_preupload_utils.py +172 -0
  304. ncatbot5-5.0.0rc7/test/core/service/test_rbac_service.py +260 -0
  305. ncatbot5-5.0.0rc7/test/core/service/test_service.py +227 -0
  306. ncatbot5-5.0.0rc7/test/core/service/test_stream_upload.py +198 -0
  307. ncatbot5-5.0.0rc7/test/core/service/unified_registry/__init__.py +1 -0
  308. ncatbot5-5.0.0rc7/test/core/service/unified_registry/test_command_runner.py +182 -0
  309. ncatbot5-5.0.0rc7/test/core/service/unified_registry/test_event_registry.py +244 -0
  310. ncatbot5-5.0.0rc7/test/core/service/unified_registry/test_executor.py +174 -0
  311. ncatbot5-5.0.0rc7/test/core/service/unified_registry/test_filter_registry.py +237 -0
  312. ncatbot5-5.0.0rc7/test/core/service/unified_registry/test_service.py +322 -0
  313. ncatbot5-5.0.0rc7/test/e2e/README.md +85 -0
  314. ncatbot5-5.0.0rc7/test/e2e/__init__.py +9 -0
  315. ncatbot5-5.0.0rc7/test/e2e/api/README.md +250 -0
  316. ncatbot5-5.0.0rc7/test/e2e/api/__init__.py +3 -0
  317. ncatbot5-5.0.0rc7/test/e2e/api/api_test_suites.py +100 -0
  318. ncatbot5-5.0.0rc7/test/e2e/api/data/config.json +20 -0
  319. ncatbot5-5.0.0rc7/test/e2e/api/data/files.json +25 -0
  320. ncatbot5-5.0.0rc7/test/e2e/api/data/friends.json +21 -0
  321. ncatbot5-5.0.0rc7/test/e2e/api/data/groups.json +23 -0
  322. ncatbot5-5.0.0rc7/test/e2e/api/data/messages.json +44 -0
  323. ncatbot5-5.0.0rc7/test/e2e/api/framework/__init__.py +35 -0
  324. ncatbot5-5.0.0rc7/test/e2e/api/framework/config.py +135 -0
  325. ncatbot5-5.0.0rc7/test/e2e/api/framework/decorators.py +98 -0
  326. ncatbot5-5.0.0rc7/test/e2e/api/framework/output.py +51 -0
  327. ncatbot5-5.0.0rc7/test/e2e/api/framework/reporter.py +159 -0
  328. ncatbot5-5.0.0rc7/test/e2e/api/framework/runner.py +371 -0
  329. ncatbot5-5.0.0rc7/test/e2e/api/framework/types.py +122 -0
  330. ncatbot5-5.0.0rc7/test/e2e/api/run.py +316 -0
  331. ncatbot5-5.0.0rc7/test/e2e/api/test_scenario_admin.py +373 -0
  332. ncatbot5-5.0.0rc7/test/e2e/api/test_scenario_basic.py +238 -0
  333. ncatbot5-5.0.0rc7/test/e2e/api/test_scenario_friend.py +197 -0
  334. ncatbot5-5.0.0rc7/test/e2e/api/test_scenario_group_file.py +314 -0
  335. ncatbot5-5.0.0rc7/test/e2e/api/test_scenario_group_msg.py +341 -0
  336. ncatbot5-5.0.0rc7/test/e2e/api/utils.py +111 -0
  337. ncatbot5-5.0.0rc7/test/e2e/bot_api/__init__.py +5 -0
  338. ncatbot5-5.0.0rc7/test/e2e/bot_api/conftest.py +38 -0
  339. ncatbot5-5.0.0rc7/test/e2e/bot_api/test_account_friend.py +127 -0
  340. ncatbot5-5.0.0rc7/test/e2e/bot_api/test_api_errors.py +202 -0
  341. ncatbot5-5.0.0rc7/test/e2e/bot_api/test_forward_support.py +165 -0
  342. ncatbot5-5.0.0rc7/test/e2e/bot_api/test_group_file.py +181 -0
  343. ncatbot5-5.0.0rc7/test/e2e/bot_api/test_group_operations.py +168 -0
  344. ncatbot5-5.0.0rc7/test/e2e/bot_api/test_messaging.py +160 -0
  345. ncatbot5-5.0.0rc7/test/e2e/cli/__init__.py +1 -0
  346. ncatbot5-5.0.0rc7/test/e2e/cli/conftest.py +67 -0
  347. ncatbot5-5.0.0rc7/test/e2e/cli/test_cli_commands.py +362 -0
  348. ncatbot5-5.0.0rc7/test/e2e/cli/test_cli_start.py +109 -0
  349. ncatbot5-5.0.0rc7/test/e2e/conftest.py +18 -0
  350. ncatbot5-5.0.0rc7/test/e2e/hot_reload/__init__.py +7 -0
  351. ncatbot5-5.0.0rc7/test/e2e/hot_reload/conftest.py +242 -0
  352. ncatbot5-5.0.0rc7/test/e2e/hot_reload/fixtures/plugins/reload_test_plugin/main.py +96 -0
  353. ncatbot5-5.0.0rc7/test/e2e/hot_reload/fixtures/plugins/reload_test_plugin/manifest.toml +3 -0
  354. ncatbot5-5.0.0rc7/test/e2e/hot_reload/test_hot_reload.py +278 -0
  355. ncatbot5-5.0.0rc7/test/e2e/hot_reload/test_initial_load.py +97 -0
  356. ncatbot5-5.0.0rc7/test/e2e/hot_reload/test_reload.py +202 -0
  357. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/__init__.py +8 -0
  358. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/conftest.py +102 -0
  359. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/basic_test_plugin/main.py +36 -0
  360. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/basic_test_plugin/manifest.toml +4 -0
  361. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/command_test_plugin/main.py +42 -0
  362. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/command_test_plugin/manifest.toml +4 -0
  363. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/config_test_plugin/main.py +68 -0
  364. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/config_test_plugin/manifest.toml +4 -0
  365. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/full_feature_plugin/main.py +86 -0
  366. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/full_feature_plugin/manifest.toml +4 -0
  367. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/handler_test_plugin/main.py +55 -0
  368. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/plugins/handler_test_plugin/manifest.toml +4 -0
  369. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/test_plugin_loading.py +256 -0
  370. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/test_plugin_reload.py +337 -0
  371. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/test_plugin_unloading.py +291 -0
  372. ncatbot5-5.0.0rc7/test/e2e/plugin_lifecycle/test_service_coordination.py +308 -0
  373. ncatbot5-5.0.0rc7/test/e2e/service/__init__.py +1 -0
  374. ncatbot5-5.0.0rc7/test/e2e/service/conftest.py +87 -0
  375. ncatbot5-5.0.0rc7/test/e2e/service/test_preupload_errors.py +310 -0
  376. ncatbot5-5.0.0rc7/test/e2e/service/test_preupload_service.py +227 -0
  377. ncatbot5-5.0.0rc7/test/e2e/service/test_preupload_utils.py +220 -0
  378. ncatbot5-5.0.0rc7/test/e2e/unified_registry/__init__.py +10 -0
  379. ncatbot5-5.0.0rc7/test/e2e/unified_registry/conftest.py +98 -0
  380. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/basic_command_plugin/main.py +77 -0
  381. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/basic_command_plugin/manifest.toml +3 -0
  382. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/command_groups_plugin/main.py +69 -0
  383. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/command_groups_plugin/manifest.toml +3 -0
  384. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/decorator_test_plugin/main.py +147 -0
  385. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/decorator_test_plugin/manifest.toml +3 -0
  386. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/error_test_plugin/main.py +54 -0
  387. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/error_test_plugin/manifest.toml +5 -0
  388. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/filter_test_plugin/main.py +119 -0
  389. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/filter_test_plugin/manifest.toml +3 -0
  390. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/help_test_plugin/main.py +119 -0
  391. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/help_test_plugin/manifest.toml +3 -0
  392. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/params_test_plugin/main.py +144 -0
  393. ncatbot5-5.0.0rc7/test/e2e/unified_registry/fixtures/plugins/params_test_plugin/manifest.toml +3 -0
  394. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_basic_commands.py +130 -0
  395. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_command_groups.py +90 -0
  396. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_decorator_validation.py +356 -0
  397. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_error_handling.py +164 -0
  398. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_filter_system.py +435 -0
  399. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_filters.py +99 -0
  400. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_help_system.py +301 -0
  401. ncatbot5-5.0.0rc7/test/e2e/unified_registry/test_params.py +205 -0
  402. ncatbot5-5.0.0rc7/test/integration/__init__.py +1 -0
  403. ncatbot5-5.0.0rc7/test/integration/conftest.py +291 -0
  404. ncatbot5-5.0.0rc7/test/integration/test_config_integration_advanced.py +363 -0
  405. ncatbot5-5.0.0rc7/test/integration/test_config_integration_core.py +326 -0
  406. ncatbot5-5.0.0rc7/test/integration/test_event_pipeline.py +269 -0
  407. ncatbot5-5.0.0rc7/test/integration/test_plugin_data_integration.py +347 -0
  408. ncatbot5-5.0.0rc7/test/integration/test_plugin_integration.py +205 -0
  409. ncatbot5-5.0.0rc7/test/integration/test_service_integration.py +268 -0
  410. ncatbot5-5.0.0rc7/test/integration/test_startup_flow.py +242 -0
  411. ncatbot5-5.0.0rc7/test/integration/test_unified_registry_integration.py +356 -0
  412. ncatbot5-5.0.0rc7/test/message_router/__init__.py +1 -0
  413. ncatbot5-5.0.0rc7/test/message_router/test_message_router.py +311 -0
  414. ncatbot5-5.0.0rc7/test/plugin_system/__init__.py +1 -0
  415. ncatbot5-5.0.0rc7/test/plugin_system/command_system/__init__.py +1 -0
  416. ncatbot5-5.0.0rc7/test/plugin_system/command_system/test_all.py +63 -0
  417. ncatbot5-5.0.0rc7/test/plugin_system/command_system/test_integration.py +413 -0
  418. ncatbot5-5.0.0rc7/test/plugin_system/command_system/test_message_tokenizer.py +332 -0
  419. ncatbot5-5.0.0rc7/test/plugin_system/command_system/test_parser_advanced.py +244 -0
  420. ncatbot5-5.0.0rc7/test/plugin_system/command_system/test_parser_basics.py +145 -0
  421. ncatbot5-5.0.0rc7/test/plugin_system/command_system/test_string_tokenizer.py +332 -0
  422. ncatbot5-5.0.0rc7/test/plugin_system/test_api_injection.py +73 -0
  423. ncatbot5-5.0.0rc7/test/plugin_system/test_cross_plugin_deep_import.py +130 -0
  424. ncatbot5-5.0.0rc7/test/plugin_system/test_cross_plugin_folder_name.py +179 -0
  425. ncatbot5-5.0.0rc7/test/plugin_system/test_cross_plugin_import.py +233 -0
  426. ncatbot5-5.0.0rc7/test/plugin_system/test_import_error_handling.py +154 -0
  427. ncatbot5-5.0.0rc7/test/plugin_system/test_pluginsys_err.py +284 -0
  428. ncatbot5-5.0.0rc7/test/plugin_system/test_relative_import_basic.py +263 -0
  429. ncatbot5-5.0.0rc7/test/plugin_system/test_time_task/__init__.py +1 -0
  430. ncatbot5-5.0.0rc7/test/plugin_system/test_time_task/conftest.py +98 -0
  431. ncatbot5-5.0.0rc7/test/plugin_system/test_time_task/test_integration.py +287 -0
  432. ncatbot5-5.0.0rc7/test/plugin_system/test_time_task/test_service_errors.py +196 -0
  433. ncatbot5-5.0.0rc7/test/rbac/__init__.py +1 -0
  434. ncatbot5-5.0.0rc7/test/rbac/conftest.py +87 -0
  435. ncatbot5-5.0.0rc7/test/rbac/e2e/__init__.py +1 -0
  436. ncatbot5-5.0.0rc7/test/rbac/e2e/conftest.py +52 -0
  437. ncatbot5-5.0.0rc7/test/rbac/e2e/test_admin_filter.py +209 -0
  438. ncatbot5-5.0.0rc7/test/rbac/e2e/test_combined_filters.py +280 -0
  439. ncatbot5-5.0.0rc7/test/rbac/e2e/test_root_filter.py +171 -0
  440. ncatbot5-5.0.0rc7/test/rbac/fixtures/plugins/rbac_test_plugin/main.py +99 -0
  441. ncatbot5-5.0.0rc7/test/rbac/fixtures/plugins/rbac_test_plugin/manifest.toml +4 -0
  442. ncatbot5-5.0.0rc7/test/rbac/test_integration.py +301 -0
  443. ncatbot5-5.0.0rc7/test/rbac/test_permission_path.py +200 -0
  444. ncatbot5-5.0.0rc7/test/rbac/test_permission_trie.py +198 -0
  445. ncatbot5-5.0.0rc7/test/rbac/test_service.py +403 -0
  446. ncatbot5-5.0.0rc7/test/rbac/test_storage.py +195 -0
  447. ncatbot5-5.0.0rc7/test/utils/__init__.py +1 -0
  448. ncatbot5-5.0.0rc7/test/utils/config/__init__.py +1 -0
  449. ncatbot5-5.0.0rc7/test/utils/config/test_manager.py +256 -0
  450. ncatbot5-5.0.0rc7/test/utils/config/test_models.py +170 -0
  451. ncatbot5-5.0.0rc7/test/utils/config/test_storage.py +164 -0
  452. ncatbot5-5.0.0rc7/test/utils/config/test_utils.py +117 -0
  453. ncatbot5-5.0.0rc7/test/utils/e2e/__init__.py +5 -0
  454. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/filtered_reply_plugin/manifest.toml +6 -0
  455. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/filtered_reply_plugin/plugin.py +36 -0
  456. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/lifecycle_plugin/manifest.toml +6 -0
  457. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/lifecycle_plugin/plugin.py +20 -0
  458. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/no_reply_plugin/manifest.toml +6 -0
  459. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/no_reply_plugin/plugin.py +23 -0
  460. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/simple_reply_plugin/manifest.toml +6 -0
  461. ncatbot5-5.0.0rc7/test/utils/e2e/plugins/simple_reply_plugin/plugin.py +33 -0
  462. ncatbot5-5.0.0rc7/test/utils/e2e/test_assertions.py +128 -0
  463. ncatbot5-5.0.0rc7/test/utils/e2e/test_basics.py +132 -0
  464. ncatbot5-5.0.0rc7/test/utils/test_error.py +168 -0
  465. ncatbot5-5.0.0rc7/test/utils/test_status.py +155 -0
  466. ncatbot5-5.0.0rc7/test/utils/test_testing_suite.py +117 -0
  467. ncatbot5-5.0.0rc7/test/utils/testing/__init__.py +4 -0
  468. ncatbot5-5.0.0rc7/test/utils/testing/fixtures/hello_plugin/main.py +41 -0
  469. ncatbot5-5.0.0rc7/test/utils/testing/fixtures/hello_plugin/manifest.toml +3 -0
  470. ncatbot5-5.0.0rc7/test/utils/testing/test_complete_flow.py +117 -0
  471. ncatbot5-5.0.0rc7/test/utils/testing/test_event_factory.py +123 -0
  472. ncatbot5-5.0.0rc7/test/utils/testing/test_helper.py +112 -0
  473. ncatbot5-5.0.0rc7/tox.ini +11 -0
@@ -0,0 +1,69 @@
1
+ name: 🐛 Bug 汇报
2
+ description: 创建一个 Bug 汇报以帮助我们改进
3
+ title: "[BUG] "
4
+ labels: ["bug"]
5
+ assignees: []
6
+
7
+ body:
8
+ - type: markdown
9
+ attributes:
10
+ value: |
11
+ 感谢花时间汇报!
12
+
13
+ - type: textarea
14
+ id: describe
15
+ attributes:
16
+ label: 1. 问题现象(必填)
17
+ description: 发生了什么?期望发生什么?
18
+ placeholder: |
19
+ 清晰简洁地描述现象与期望结果。
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: reproduce
25
+ attributes:
26
+ label: 2. 复现步骤(必填,最好包括代码)
27
+ description: 如何稳定复现?越具体越好
28
+ placeholder: |
29
+ 1. 启动 NapCat …
30
+ 2. 发送消息 …
31
+ 3. 看到报错 …
32
+ validations:
33
+ required: true
34
+
35
+ - type: textarea
36
+ id: env
37
+ attributes:
38
+ label: 3. 运行环境(必填)
39
+ description: 建议直接复制下面三行填写
40
+ placeholder: |
41
+ - OS: Win11 23H2 / Ubuntu 22.04
42
+ - NcatBot: v4.2.x
43
+ - NapCat: v4.x.y
44
+ validations:
45
+ required: true
46
+
47
+ - type: textarea
48
+ id: logs
49
+ attributes:
50
+ label: 4. 关键日志 / 截图
51
+ description: 日志请复制**文本**(不要截长图),敏感信息请打码
52
+ render: text
53
+
54
+ - type: textarea
55
+ id: config
56
+ attributes:
57
+ label: 5. 相关配置项
58
+ description: 只贴**改动过**的片段,用 ```yaml 包裹
59
+ render: yaml
60
+
61
+ - type: checkboxes
62
+ id: checklist
63
+ attributes:
64
+ label: 6. 自查清单
65
+ options:
66
+ - label: 我已经升级到最新版(NcatBot & NapCat)
67
+ required: true
68
+ - label: 我已经搜索过历史 Issues
69
+ required: true
@@ -0,0 +1,63 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Publish to PyPI
10
+
11
+ on:
12
+ push:
13
+ branches:
14
+ - main # 指定触发的分支,根据实际情况修改
15
+ paths:
16
+ - "pyproject.toml" # 当 pyproject.toml 文件发生变化时触发
17
+ workflow_dispatch: # 允许手动触发
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ # test:
24
+ # runs-on: ubuntu-latest
25
+ # strategy:
26
+ # matrix:
27
+ # python-version: ["3.13", "3.11", "3.9"]
28
+
29
+ # steps:
30
+ # - uses: actions/checkout@v4
31
+
32
+ # - name: Install uv
33
+ # uses: astral-sh/setup-uv@v4
34
+
35
+ # - name: Set up Python ${{ matrix.python-version }}
36
+ # run: uv python install ${{ matrix.python-version }}
37
+
38
+ # - name: Install dependencies
39
+ # run: uv sync --extra dev
40
+
41
+ # - name: Run tests
42
+ # run: uv run pytest
43
+
44
+ build-and-publish:
45
+ runs-on: ubuntu-latest
46
+ permissions:
47
+ # 重要:如果使用 OIDC 发布,需要这个权限
48
+ id-token: write
49
+ # needs:
50
+ # - test # 如果启用了测试 Job,则在测试通过后再发布
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: astral-sh/setup-uv@v4
54
+
55
+ - name: Build
56
+ run: uv build
57
+
58
+ - name: Publish to PyPI
59
+ # 使用官方专用的 Action
60
+ uses: pypa/gh-action-pypi-publish@release/v1
61
+ with:
62
+ # 如果你在 PyPI 开启了 Trusted Publishing,甚至不需要配置 TOKEN
63
+ password: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,31 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.13", "3.11", "3.9"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v4
23
+
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ run: uv python install ${{ matrix.python-version }}
26
+
27
+ - name: Install dependencies
28
+ run: uv sync --extra dev
29
+
30
+ - name: Run tests
31
+ run: uv run pytest --no-cov
@@ -0,0 +1,182 @@
1
+ # 在项目根目录创建 .gitignore
2
+ echo "dist/
3
+ build/
4
+ *.egg-info/
5
+ __pycache__/
6
+ *.pyc" >> .gitignore
7
+
8
+ # Byte-compiled / optimized / DLL files
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+ uv.lock
42
+
43
+ # Installer logs
44
+ pip-log.txt
45
+ pip-delete-this-directory.txt
46
+
47
+ # Unit test / coverage reports
48
+ htmlcov/
49
+ .tox/
50
+ .nox/
51
+ .coverage
52
+ .coverage.*
53
+ .cache
54
+ nosetests.xml
55
+ coverage.xml
56
+ *.cover
57
+ *.py,cover
58
+ .hypothesis/
59
+ .pytest_cache/
60
+ cover/
61
+
62
+ # Translations
63
+ *.mo
64
+ *.pot
65
+
66
+ # Django stuff:
67
+ *.log
68
+ local_settings.py
69
+ db.sqlite3
70
+ db.sqlite3-journal
71
+
72
+ # Flask stuff:
73
+ instance/
74
+ .webassets-cache
75
+
76
+ # Scrapy stuff:
77
+ .scrapy
78
+
79
+ # Sphinx documentation
80
+ docs/_build/
81
+
82
+ <<<<<<< HEAD
83
+ # Virtual environments and environment files
84
+ .venv/
85
+ venv/
86
+ env/
87
+ ENV/
88
+ env.bak/
89
+ venv.bak/
90
+ .env
91
+ .venv
92
+ uv.lock
93
+ =======
94
+ # PyBuilder
95
+ .pybuilder/
96
+ target/
97
+ >>>>>>> origin/main
98
+
99
+ # Jupyter Notebook
100
+ .ipynb_checkpoints
101
+
102
+ # IPython
103
+ profile_default/
104
+ ipython_config.py
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
112
+ .pdm.toml
113
+ .pdm-python
114
+ .pdm-build/
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyPI configuration file
160
+ .pypirc
161
+ .fseventsd
162
+
163
+ # 开发工具
164
+ .vscode/
165
+ .cursor/
166
+ .idea/
167
+
168
+ # Runtime
169
+ logs/
170
+ /data
171
+ /plugins
172
+ /napcat
173
+
174
+ # development
175
+ dev/
176
+
177
+ # Misc
178
+ .ipynb_checkpoints
179
+ *.log
180
+ *.sqlite3
181
+ *.sqlite3-journal
182
+ *.DS_Store
@@ -0,0 +1,32 @@
1
+ default_stages: [pre-commit, pre-push, manual]
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v5.0.0
5
+ hooks:
6
+ - id: check-symlinks
7
+ - id: destroyed-symlinks
8
+ - id: trailing-whitespace
9
+ - id: end-of-file-fixer
10
+ - id: check-yaml
11
+ - id: check-toml
12
+ - id: check-ast
13
+ - id: check-added-large-files
14
+ - id: check-merge-conflict
15
+ - id: check-executables-have-shebangs
16
+ - id: check-shebang-scripts-are-executable
17
+ - id: detect-private-key
18
+ - id: debug-statements
19
+ - id: mixed-line-ending
20
+ args: ['--fix=crlf']
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ rev: v0.9.4
23
+ hooks:
24
+ - id: ruff
25
+ args: [--fix, --exit-non-zero-on-fix]
26
+ - id: ruff-format # 替代 black
27
+
28
+ - repo: https://github.com/codespell-project/codespell
29
+ rev: v2.4.1
30
+ hooks:
31
+ - id: codespell
32
+ additional_dependencies: [".[toml]"]
@@ -0,0 +1,147 @@
1
+ # 贡献指南
2
+
3
+ 本文件仅面向开发者,说明从 fork 到提交 PR 的必要步骤。假定你已经将仓库 fork 到自己的 GitHub 账号,并从自己的 fork 克隆到本地。
4
+
5
+ ## 贡献步骤
6
+
7
+ 1. Fork 本仓库
8
+ 2. clone 你 Fork 的仓库到本地
9
+ 3. 准备开发环境
10
+ 4. 开发并测试
11
+ 5. 启用 pre-commit 钩子检查并提交
12
+ 6. 推送到你自己 Fork 的 Repo
13
+ 7. 开 Pull Request
14
+
15
+
16
+ ## 环境准备
17
+
18
+ ### clone 到本地
19
+
20
+ ```bash
21
+ git clone https://github.com/<你的用户名>/ncatbot.git
22
+ cd ncatbot
23
+ ```
24
+
25
+ ### 准备开发环境
26
+
27
+ 推荐使用 uv 管理环境:
28
+
29
+ ```bash
30
+ uv venv
31
+ source .venv/bin/activate # Linux/macOS
32
+ # 或 .venv\Scripts\activate # Windows
33
+ uv pip install -e '.[dev]'
34
+ ```
35
+
36
+ 或使用传统 pip:
37
+
38
+ ```bash
39
+ python -m venv .venv
40
+ source .venv/bin/activate
41
+ pip install -e '.[dev]'
42
+ ```
43
+
44
+ ### 启用 pre-commit 钩子(只需执行一次)
45
+
46
+ ```bash
47
+ uv run pre-commit install
48
+ ```
49
+ - pre-commit 会在 `git commit` 时检查代码格式并做一定自动修复。若 pre-commit 自动修复了文件,请执行 `git add` 将修复后的文件重新暂存后再提交。
50
+ - 如果存在无法自动修复的错误,请尽量认真阅读错误描述并修复。若确有必要跳过本地检查(不推荐),可使用 `git commit --no-verify`。
51
+
52
+ ## 开发
53
+
54
+
55
+ - 新建分支进行开发:
56
+
57
+ ```bash
58
+ git checkout -b feat/描述性短名
59
+ ```
60
+
61
+ - 使用 [Conventional Commits](https://www.conventionalcommits.org/zh-hans/v1.0.0/) 编写提交信息,例如:
62
+
63
+ ```bash
64
+ git commit -m "feat: 添加消息撤回功能"
65
+ git commit -m "fix(api): 修复消息队列溢出问题 #123"
66
+ git commit -m "docs: 更新安装指南"
67
+ ```
68
+
69
+ ## 测试
70
+
71
+ 运行测试:
72
+
73
+ ```bash
74
+ uv run pytest
75
+ ```
76
+
77
+ 运行带覆盖率的测试:
78
+
79
+ ```bash
80
+ uv run pytest --cov=ncatbot --cov-report=term-missing
81
+ ```
82
+
83
+ ### 多版本测试(可选)
84
+
85
+ 如需在多个 Python 版本(3.13, 3.11, 3.9)上运行测试,可使用 tox:
86
+
87
+ ```bash
88
+ uv run tox
89
+ ```
90
+
91
+ 也可以只运行特定版本:
92
+
93
+ ```bash
94
+ uv run tox -e py313
95
+ ```
96
+
97
+ > 注意:多版本测试不是提交 PR 的必要条件,CI 会自动在多版本上运行测试。
98
+
99
+ ## 依赖管理
100
+
101
+ 本项目使用 pip-tools 工作流管理依赖:
102
+
103
+ - **pyproject.toml**:定义顶层依赖(宽泛版本)
104
+ - **requirements.txt**:由 pip-compile 自动生成的锁定版本文件
105
+
106
+ ### 更新依赖
107
+
108
+ 如需添加或修改依赖:
109
+
110
+ 1. 编辑 `pyproject.toml` 中的 `dependencies` 列表
111
+ 2. 重新生成 requirements.txt:
112
+
113
+ ```bash
114
+ pip-compile pyproject.toml -o requirements.txt --strip-extras
115
+ ```
116
+
117
+ 3. 将两个文件一起提交
118
+
119
+ ### 升级所有依赖到最新版本
120
+
121
+ ```bash
122
+ pip-compile pyproject.toml -o requirements.txt --strip-extras --upgrade
123
+ ```
124
+
125
+ ## 提交 PR
126
+
127
+
128
+ ```bash
129
+ git push origin feat/描述性短名
130
+ ```
131
+
132
+ - 在 GitHub 上为上游仓库创建 Pull Request(目标仓库为原始仓库),在说明里写明变更内容并关联 Issue(如有)。
133
+
134
+ ## 代码规范
135
+
136
+ 代码规范(要点)
137
+ - 遵循 PEP8,**尽量添加类型注解**。
138
+ - 必要时添加清晰的 docstring,例如:
139
+
140
+ ```python
141
+ def handle_event(event: Event):
142
+ """处理机器人事件。
143
+
144
+ Args:
145
+ event: 继承自 BaseEvent 的事件对象。
146
+ """
147
+ ```
@@ -0,0 +1,32 @@
1
+ NcatBot Non-Commercial License
2
+
3
+ Copyright (c) 2025 NcatBot开发项目组
4
+
5
+ 在遵守以下条款的前提下,特此免费授予任何获得本软件及相关文档文件(以下简称“软件”)的人员不受限制地处置本软件的权利,包括但不限于使用、复制、修改、合并、发布、分发、再许可的权利:
6
+
7
+ 一、约束条款
8
+ 1. 未经授权,禁止商业用途
9
+ - 不得直接或间接通过本软件获利,包括但不限于:
10
+ * 售卖软件副本或衍生作品
11
+ * 作为商业产品或服务组成部分
12
+ * 用于广告推广或流量变现
13
+ * 其他以营利为目的的使用场景
14
+
15
+ 2. 二次开发授权
16
+ - 修改后的衍生作品需满足:
17
+ * 必须保留原始版权声明
18
+ * 需通过邮件(lyh_02@foxmail.com)提交授权申请
19
+ * 获得书面授权后方可分发
20
+
21
+ 二、违约处理
22
+ 1. 违反上述条款自动终止授权
23
+ 2. 需承担因此造成的所有法律责任
24
+ 3. 侵权方需承担维权产生的合理费用
25
+
26
+ 三、免责声明
27
+ 本软件按"原样"提供,不做任何明示或暗示的担保,包括但不限于对适销性、特定用途适用性的担保。在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任负责。
28
+
29
+ 四、管辖法律
30
+ 本协议适用中华人民共和国法律,任何争议应提交厦门仲裁委员会仲裁解决。
31
+
32
+ 本协议最终解释权归NcatBot开发项目组所有。
@@ -0,0 +1,7 @@
1
+ include LICENSE
2
+ include README.md
3
+ include NOTICE
4
+ include requirements.txt
5
+ include pyproject.toml
6
+ recursive-include src *.py # 包含所有Python文件
7
+ recursive-include src *.txt *.md # 包含文本文件
@@ -0,0 +1,5 @@
1
+ 商业使用授权申请需包含:
2
+ - 申请方基本信息
3
+ - 使用场景描述
4
+ - 预计用户规模
5
+ - 联系方式
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: ncatbot5
3
+ Version: 5.0.0rc7
4
+ Summary: NcatBot, NapCat Python SDK
5
+ Author-email: 木子 <lyh_02@qq.com>, huan-yp <huan_yp@qq.com>
6
+ License: MIT
7
+ Project-URL: Source, https://github.com/ncatbot/ncatbot
8
+ Project-URL: Bug Reports, https://github.com/ncatbot/ncatbot/issues
9
+ Project-URL: Documentation, https://github.com/ncatbot/ncatbot/wiki
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ License-File: NOTICE
14
+ Requires-Dist: pydantic>=2.0
15
+ Requires-Dist: schedule
16
+ Requires-Dist: pyyaml>=6.0
17
+ Requires-Dist: toml
18
+ Requires-Dist: tomli>=1.1.0; python_version < "3.11"
19
+ Requires-Dist: websockets
20
+ Requires-Dist: requests>=2.28
21
+ Requires-Dist: aiofiles
22
+ Requires-Dist: psutil>=5.9
23
+ Requires-Dist: packaging
24
+ Requires-Dist: rich
25
+ Requires-Dist: tqdm>=4.60
26
+ Requires-Dist: typing-extensions
27
+ Requires-Dist: qrcode
28
+ Requires-Dist: colorama>=0.4.6; platform_system == "Windows"
29
+ Provides-Extra: dev
30
+ Requires-Dist: ncatbot[test]; extra == "dev"
31
+ Requires-Dist: build; extra == "dev"
32
+ Requires-Dist: twine; extra == "dev"
33
+ Requires-Dist: tox>=4.0; extra == "dev"
34
+ Requires-Dist: tox-uv; extra == "dev"
35
+ Requires-Dist: uv; extra == "dev"
36
+ Requires-Dist: pip-tools; extra == "dev"
37
+ Requires-Dist: pre-commit; extra == "dev"
38
+ Requires-Dist: black; extra == "dev"
39
+ Requires-Dist: ruff; extra == "dev"
40
+ Requires-Dist: mypy; extra == "dev"
41
+ Requires-Dist: isort; extra == "dev"
42
+ Requires-Dist: pytest>=7.0; extra == "dev"
43
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
44
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
45
+ Requires-Dist: pytest-html>=4.0; extra == "dev"
46
+ Dynamic: license-file
47
+
48
+ <div align="center">
49
+
50
+ # 🚀 ncatbot
51
+
52
+ ---
53
+
54
+ ![logo.png](https://socialify.git.ci/ncatbot/NcatBot/image?custom_description=ncatbot+%EF%BC%8C%E5%9F%BA%E4%BA%8E+OneBot11%E5%8D%8F%E8%AE%AE+%E7%9A%84+QQ+%E6%9C%BA%E5%99%A8%E4%BA%BA+Python+SDK%EF%BC%8C%E5%BF%AB%E9%80%9F%E5%BC%80%E5%8F%91%EF%BC%8C%E8%BD%BB%E6%9D%BE%E9%83%A8%E7%BD%B2%E3%80%82&description=1&font=Jost&forks=1&issues=1&logo=https%3A%2F%2Fimg.remit.ee%2Fapi%2Ffile%2FAgACAgUAAyEGAASHRsPbAAO9Z_FYKczZ5dly9IKmC93J_sF7qRUAAmXEMRtA2ohX1eSKajqfARABAAMCAAN5AAM2BA.jpg&pattern=Signal&pulls=1&stargazers=1&theme=Auto)
55
+
56
+ <a href="https://pypi.org/project/ncatbot5/"><img src="https://img.shields.io/pypi/v/ncatbot5"></a>
57
+ [![OneBot v11](https://img.shields.io/badge/OneBot-v11-black.svg)](https://github.com/botuniverse/onebot)
58
+ [![访问量统计](https://visitor-badge.laobi.icu/badge?page_id=li-yihao0328.ncatbot_sync)](https://github.com/ncatbot/ncatbot)
59
+ <a><img src="https://img.shields.io/badge/License-NcatBot License-green.svg"></a>
60
+ <a href="https://qm.qq.com/q/CHbzJ2LH4k"><img src="https://img.shields.io/badge/官方群聊-201487478-brightgreen.svg"></a>
61
+ <a href="https://qm.qq.com/q/CHbzJ2LH4k"><img src="https://img.shields.io/badge/官方频道-pd63222487-brightgreen.svg"></a>
62
+ <a href="https://ippclub.org"><img src="https://img.shields.io/badge/I%2B%2B%E4%BF%B1%E4%B9%90%E9%83%A8-%E8%AE%A4%E8%AF%81-11A7E2?logo=data%3Aimage%2Fsvg%2Bxml%3Bcharset%3Dutf-8%3Bbase64%2CPHN2ZyB2aWV3Qm94PSIwIDAgMjg4IDI3NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjIiPjxwYXRoIGQ9Im0xNDYgMzEgNzIgNTVWMzFoLTcyWiIgc3R5bGU9ImZpbGw6I2Y2YTgwNjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0xNjkgODYtMjMtNTUgNzIgNTVoLTQ5WiIgc3R5bGU9ImZpbGw6I2VmN2EwMDtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Ik0yNiAzMXY1NWg4MEw4MSAzMUgyNloiIHN0eWxlPSJmaWxsOiMwN2ExN2M7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJNMTA4IDkydjExMmwzMS00OC0zMS02NFoiIHN0eWxlPSJmaWxsOiNkZTAwNWQ7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJNMCAyNzR2LTUyaDk3bC0zMyA1MkgwWiIgc3R5bGU9ImZpbGw6I2Y2YTgwNjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im03NyAyNzQgNjctMTA3djEwN0g3N1oiIHN0eWxlPSJmaWxsOiNkZjI0MzM7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJNMTUyIDI3NGgyOWwtMjktNTN2NTNaIiBzdHlsZT0iZmlsbDojMzM0ODVkO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTE5MSAyNzRoNzl2LTUySDE2N2wyNCA1MloiIHN0eWxlPSJmaWxsOiM0ZTI3NWE7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJNMjg4IDEwMGgtMTdWODVoLTEzdjE1aC0xN3YxM2gxN3YxNmgxM3YtMTZoMTd2LTEzWiIgc3R5bGU9ImZpbGw6I2M1MTgxZjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0yNiA4NiA1Ni01NUgyNnY1NVoiIHN0eWxlPSJmaWxsOiMzMzQ4NWQ7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJNOTMgMzFoNDJsLTMwIDI5LTEyLTI5WiIgc3R5bGU9ImZpbGw6IzExYTdlMjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Ik0xNTggMTc2Vjg2bC0zNCAxNCAzNCA3NloiIHN0eWxlPSJmaWxsOiMwMDU5OGU7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJtMTA2IDU5IDQxLTEtMTItMjgtMjkgMjlaIiBzdHlsZT0iZmlsbDojMDU3Y2I3O2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0ibTEyNCAxMDAgMjItNDEgMTIgMjctMzQgMTRaIiBzdHlsZT0iZmlsbDojNGUyNzVhO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0ibTEwNiA2MCA0MS0xLTIzIDQxLTE4LTQwWiIgc3R5bGU9ImZpbGw6IzdiMTI4NTtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0xMDggMjA0IDMxLTQ4aC0zMXY0OFoiIHN0eWxlPSJmaWxsOiNiYTAwNzc7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJtNjUgMjc0IDMzLTUySDBsNjUgNTJaIiBzdHlsZT0iZmlsbDojZWY3YTAwO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTc3IDI3NGg2N2wtNDAtNDUtMjcgNDVaIiBzdHlsZT0iZmlsbDojYTgxZTI0O2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTE2NyAyMjJoNThsLTM0IDUyLTI0LTUyWiIgc3R5bGU9ImZpbGw6IzExYTdlMjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0yNzAgMjc0LTQ0LTUyLTM1IDUyaDc5WiIgc3R5bGU9ImZpbGw6IzA1N2NiNztmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Ik0yNzUgNTVoLTU3VjBoMjV2MzFoMzJ2MjRaIiBzdHlsZT0iZmlsbDojZGUwMDVkO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTE4NSAzMWg1N3Y1NWgtMjVWNTVoLTMyVjMxWiIgc3R5bGU9ImZpbGw6I2M1MTgxZjtmaWxsLXJ1bGU6bm9uemVybyIvPjwvc3ZnPg%3D%3D&labelColor=fff"></a>
63
+ </p>
64
+
65
+ [文档](https://docs.ncatbot.xyz) | [许可证](LICENSE) | [QQ群](https://qm.qq.com/q/AmdNUkSxFY) | [插件社区](https://www.ityzs.com/)
66
+
67
+ NcatBot 是基于 OneBot11 协议的 Python SDK,它提供了一套方便易用的 Python 接口,用于开发 QQ 机器人。
68
+
69
+ </div>
70
+
71
+
72
+ ## 如何使用
73
+
74
+
75
+ - 认真阅读本项目[文档](https://docs.ncatbot.xyz)
76
+ - 使用 Docker [部署](https://github.com/ncatbot/NcatBot-Docker)。
77
+
78
+ ## 欢迎来玩
79
+
80
+ [是 QQ 群哦喵~](https://qm.qq.com/q/L6XGXYqL86)
81
+
82
+ ## 获取帮助
83
+
84
+ -- 遇到任何困难时,请先按照以下顺序尝试解决:
85
+
86
+ 1. **仔细阅读**[文档](https://docs.ncatbot.xyz).
87
+ 2. 询问 [Gemini](https://gemini.google.com/), [Kimi](https://kimi.ai) 等人工智能.
88
+ 3. 搜索本项目的 [Issue 列表](https://github.com/ncatbot/ncatbot/issues).
89
+ -- 如果以上方法都无法解决你的问题,那么:
90
+ 1. 在 [Issue 列表](https://github.com/ncatbot/ncatbot/issues) 发 Issue 求助。
91
+ 2. [进群](https://qm.qq.com/q/L6XGXYqL86)提问。
92
+
93
+ ## 使用限制
94
+
95
+ 1. **严禁将本项目以任何形式用于传播淫秽、反动或暴力等信息。**
96
+ 2. **未经授权,禁止将本项目以任何形式用于盈利。**
97
+
98
+ ## 致谢
99
+
100
+ 感谢 [NapCat](https://github.com/NapNeko/NapCatQQ) 提供底层接口 | [IppClub](https://github.com/IppClub) 的宣传支持 | [Fcatbot](https://github.com/Fish-LP/Fcatbot) 提供代码和灵感。
101
+
102
+ 感谢 [林枫云](https://www.dkdun.cn/) 提供服务器支持。
103
+
104
+ ## 参与贡献
105
+
106
+ 如果在你使用过程中遇到问题,或有任何建议,欢迎在 [GitHub Issues](https://github.com/ncatbot/ncatbot/issues) 中反馈。
107
+
108
+ 欢迎给本 Repo 贡献代码!请先阅读 [贡献指南](CONTRIBUTING.md)。
109
+
110
+ 感谢你的支持!
111
+
112
+
113
+ <div align="center">
114
+
115
+ ## Star History
116
+
117
+ [![Star History Chart](https://api.star-history.com/svg?repos=ncatbot/ncatbot&type=Date)](https://www.star-history.com/#ncatbot/ncatbot&Date)
118
+
119
+ ## 贡献者们
120
+
121
+ <a href="https://github.com/ncatbot/ncatbot/graphs/contributors">
122
+ <img src="https://contrib.rocks/image?repo=ncatbot/ncatbot" />
123
+ </a>
124
+
125
+ </div>