Dev (#78)
* fix(discord): 修复 WebSocket 连接检测并增强跨平台文件处理 修复 Discord WebSocket 连接检测逻辑,使用正确的属性检查连接状态 为跨平台消息处理添加文件类型支持,并增加详细的调试日志 优化附件处理逻辑,确保所有文件类型都能正确识别和转发 * feat(跨平台): 优化消息处理并添加纯文本提取功能 添加 extract_text_only 函数过滤非文本标记 修改翻译逻辑仅处理纯文本内容 完善附件处理和消息内容拼接 修复仅包含表情时的消息处理问题 * refactor(discord-cross): 使用模块专用日志记录器替换全局日志记录器 将各模块中的全局日志记录器替换为模块专用日志记录器,以提供更清晰的日志来源标识 同时在适配器中添加会话状态检查和重连机制,提升消息发送的可靠性 * feat(翻译): 改进翻译功能,同时显示原文和译文 修改翻译功能,不再替换原文而是同时显示原文和翻译内容,方便用户对照 更新 DeepSeek API 配置为官方地址和模型 优化 Discord 适配器的重连逻辑,直接关闭 WebSocket 触发重连 修复 Discord 频道 ID 转换逻辑,简化处理流程 * feat(cross-platform): 添加跨平台功能支持及配置优化 - 新增跨平台配置模型和全局配置支持 - 优化 Discord 适配器的连接管理和错误处理 - 添加 watchdog 和 discord.py 依赖 - 创建 DeepSeek API 配置文档 - 移除重复的同步帮助图片代码 - 改进跨平台插件配置加载逻辑 * fix(jrcd): 修正群组ID检查条件 删除不再使用的示例插件文件 * feat: 改进配置加载逻辑并更新项目配置 当配置文件不存在时自动生成示例配置 添加pyproject.toml作为项目构建配置 更新.gitignore忽略更多文件类型 删除不再使用的反向WebSocket示例文件 * docs: 更新架构文档和项目结构说明 添加反向WebSocket连接模式说明 补充核心管理器文档 更新项目结构文件 在文档首页添加特色功能说明 * fix(discord): 修复WebSocket连接检查并添加错误日志 refactor(config): 更新配置文件的网络和认证信息 feat(cross-platform): 为跨平台消息处理添加异常捕获和日志
This commit is contained in:
91
pyproject.toml
Normal file
91
pyproject.toml
Normal file
@@ -0,0 +1,91 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "neobot"
|
||||
version = "0.1.0"
|
||||
description = "NEO Bot Framework - A high-performance bot framework"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.14"
|
||||
license = {text = "MIT"}
|
||||
authors = [
|
||||
{name = "Neo", email = "neo@example.com"}
|
||||
]
|
||||
keywords = ["bot", "discord", "qq", "onebot"]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.14",
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"aiohttp>=3.9.0",
|
||||
"websockets>=12.0",
|
||||
"playwright>=1.40.0",
|
||||
"redis>=5.0.0",
|
||||
"orjson>=3.9.0",
|
||||
"loguru>=0.7.0",
|
||||
"tomlkit>=0.12.0",
|
||||
"watchdog>=3.0.0",
|
||||
"discord.py>=2.0.0",
|
||||
"aiohappyeyeballs>=2.6.1",
|
||||
"aiomysql>=0.2.0",
|
||||
"beautifulsoup4>=4.12.0",
|
||||
"requests>=2.31.0",
|
||||
"cython>=3.0.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pyinstrument>=4.5.0",
|
||||
"memory-profiler>=0.61.0",
|
||||
"psutil>=5.9.8",
|
||||
"pytest>=7.4.0",
|
||||
"pytest-asyncio>=0.21.0",
|
||||
"flake8>=7.0.0",
|
||||
"mypy>=1.5.0",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/yourusername/neobot"
|
||||
Documentation = "https://github.com/yourusername/neobot#readme"
|
||||
Repository = "https://github.com/yourusername/neobot"
|
||||
"Bug Tracker" = "https://github.com/yourusername/neobot/issues"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["core", "models", "plugins", "adapters"]
|
||||
package-dir = {"" = "."}
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"core" = ["py.typed"]
|
||||
"plugins" = ["**/*.py"]
|
||||
"models" = ["**/*.py"]
|
||||
|
||||
[tool.setuptools.exclude-package-data]
|
||||
"*" = [
|
||||
"config.toml",
|
||||
"config.example.toml",
|
||||
"ca/*",
|
||||
"*.pem",
|
||||
"*.key",
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
python_files = ["test_*.py"]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.14"
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
disallow_untyped_defs = true
|
||||
check_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
warn_redundant_casts = true
|
||||
warn_subclassing = true
|
||||
strict_optional = true
|
||||
plugins = ["mypy.plugins.asyncio"]
|
||||
Reference in New Issue
Block a user