未能成为人类

This commit is contained in:
2026-03-27 14:46:50 +08:00
parent caf53cfd5d
commit c21bc66c80
3 changed files with 1 additions and 21 deletions

View File

@@ -433,17 +433,10 @@ def require_admin(func):
"""
from functools import wraps
from neobot.models.events.message import MessageEvent
<<<<<<< HEAD
from neobot.core.managers import permission_manager
@wraps(func)
async def wrapper(event: MessageEvent, *args, **kwargs):
=======
@wraps(func)
async def wrapper(event: MessageEvent, *args, **kwargs):
from neobot.core.managers import permission_manager
>>>>>>> eb9079744c82f8e254de084a3a089ef91c37e9dc
pm = permission_manager
if not await pm.is_admin(event.user_id):
await event.reply("此命令仅限管理员使用")

View File

@@ -62,17 +62,12 @@ class PluginManager(Singleton):
扫描并加载 `plugins` 目录下的所有插件。
"""
# 使用 pathlib 获取更可靠的路径
<<<<<<< HEAD
# 当前文件core/managers/plugin_manager.py
# 目标neobot/plugins/
=======
# 当前文件src/neobot/core/managers/plugin_manager.py
# 目标src/neobot/plugins/
>>>>>>> eb9079744c82f8e254de084a3a089ef91c37e9dc
current_dir = os.path.dirname(os.path.abspath(__file__))
# 回退三级到项目根目录 (core/managers -> core -> neobot -> src)
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(current_dir)))
plugin_dir = os.path.join(root_dir, "src", "neobot", "plugins")
plugin_dir = os.path.join(root_dir, "neobot", "plugins")
# 使用完整的包名neobot.plugins
package_name = "neobot.plugins"

View File

@@ -17,15 +17,7 @@ class CrossPlatformConfig:
self.ENABLE_CROSS_PLATFORM = True
# DeepSeek API 配置 - 从环境变量或配置文件加载
<<<<<<< HEAD
self.DEEPSEEK_API_KEY = os.environ.get("DEEPSEEK_API_KEY", "sk-28b794e08e184f868d6c0107a46e0c3e")
=======
<<<<<<< HEAD:src/neobot/plugins/discord-cross/config.py
self.DEEPSEEK_API_KEY = os.environ.get("DEEPSEEK_API_KEY", "sk-28b794e08e184f868d6c0107a46e0c3e")
=======
self.DEEPSEEK_API_KEY = os.environ.get("DEEPSEEK_API_KEY", "sk-f71322a9fbba4b05a7df969cb4004f06")
>>>>>>> origin/main:plugins/discord-cross/config.py
>>>>>>> eb9079744c82f8e254de084a3a089ef91c37e9dc
self.DEEPSEEK_API_URL = os.environ.get("DEEPSEEK_API_URL", "https://api.deepseek.com/v1/chat/completions")
self.DEEPSEEK_MODEL = os.environ.get("DEEPSEEK_MODEL", "deepseek-chat")