✨ 重构帮助,限制普通用户查询管理插件 (#1626)

This commit is contained in:
HibiKier
2024-09-14 05:23:55 +08:00
committed by GitHub
parent d97e437e80
commit 029a731fb9
9 changed files with 491 additions and 367 deletions
+12
View File
@@ -266,6 +266,18 @@ class PlatformUtils:
)
return None
@classmethod
async def get_user_avatar_url(cls, user_id: str, platform: str) -> str | None:
"""快捷获取用户头像url
参数:
user_id: 用户id
platform: 平台
"""
if platform == "qq":
return f"http://q1.qlogo.cn/g?b=qq&nk={user_id}&s=160"
return None
@classmethod
async def get_group_avatar(cls, gid: str, platform: str) -> bytes | None:
"""快捷获取用群头像