feat(nickname): 删除昵称系统相关功能 (#2114)

删除了昵称系统的完整实现,包括:
- 移除 nickname.py 插件文件及其所有功能代码
- 从 FriendUser 和 GroupInfoUser 模型中删除 nickname 字段
- 移除相关的数据库配置
- 更新 GroupManager 中的操作者名称获取逻辑
- 简化平台处理的数据源代码
This commit is contained in:
molanp
2026-04-07 08:41:46 +08:00
committed by GitHub
parent 480848fada
commit c9efdaedcf
4 changed files with 11 additions and 414 deletions
@@ -40,9 +40,7 @@ _REFRESH_TASKS: set[asyncio.Task] = set()
def _normalize_platform(platform: str | set[str] | None) -> str | None:
if isinstance(platform, set):
return next(iter(platform), None)
return platform
return next(iter(platform), None) if isinstance(platform, set) else platform
async def _safe_get_group_member_info(bot: Bot, group_id: str, user_id: str) -> dict:
@@ -409,12 +407,11 @@ class GroupManager:
operator_user = await GroupInfoUser.get_or_none(
user_id=operator_id, group_id=group_id
)
if operator_user:
operator_name = (
operator_user.nickname or operator_user.user_name or operator_id
)
else:
operator_name = operator_id
operator_name = (
(operator_user.user_name or operator_id)
if operator_user
else operator_id
)
else:
operator_name = ""
return f"{user_name} 被 {operator_name} 送走了."