mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 19:00:00 +08:00
bugfix:更换数据库初始化超时路径以修复连接超时问题 (#2137)
* bugfix:更换数据库初始化超时路径以修复连接超时问题 * 移除部分观测链路 * 细节修改 * 权限检查细节修改2 * bugfix:修复金币懒加载造成插件金币消耗不了的问题 * bugfix:整理鉴权逻辑 * 完善缓存系统 * 优化官端使用 * bugfix:增加官机和频道的前导统一剥离,新增获取群列表自愈 * bugfix:修复导入问题
This commit is contained in:
@@ -213,9 +213,10 @@ async def _(param: HandleRequest) -> Result:
|
||||
group.group_flag = 1
|
||||
await group.save(update_fields=["group_flag"])
|
||||
else:
|
||||
await GroupConsole.update_or_create(
|
||||
await GroupConsole.get_or_create_root_group(
|
||||
group_id=req.group_id,
|
||||
defaults={"group_flag": 1},
|
||||
update_defaults=True,
|
||||
)
|
||||
try:
|
||||
await FgRequest.approve(bot, param.id)
|
||||
@@ -240,8 +241,7 @@ async def _(param: HandleRequest) -> Result:
|
||||
async def _(param: LeaveGroup) -> Result:
|
||||
try:
|
||||
bot = nonebot.get_bot(param.bot_id)
|
||||
platform = PlatformUtils.get_platform(bot)
|
||||
if platform != "qq":
|
||||
if PlatformUtils.get_platform_scope(bot) != "qq_client":
|
||||
return Result.warning_("该平台不支持退群操作...")
|
||||
group_list, _ = await PlatformUtils.get_group_list(bot)
|
||||
if param.group_id not in [g.group_id for g in group_list]:
|
||||
@@ -265,8 +265,7 @@ async def _(param: LeaveGroup) -> Result:
|
||||
async def _(param: DeleteFriend) -> Result:
|
||||
try:
|
||||
bot = nonebot.get_bot(param.bot_id)
|
||||
platform = PlatformUtils.get_platform(bot)
|
||||
if platform != "qq":
|
||||
if PlatformUtils.get_platform_scope(bot) != "qq_client":
|
||||
return Result.warning_("该平台不支持删除好友操作...")
|
||||
friend_list, _ = await PlatformUtils.get_friend_list(bot)
|
||||
if param.user_id not in [f.user_id for f in friend_list]:
|
||||
|
||||
Reference in New Issue
Block a user