mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-06 04:10:02 +08:00
✨ 添加自动同意群组请求 (#1848)
* ✨ 添加自动同意群组请求 * ➕ Add nonebot-plugin-waiter --------- Co-authored-by: BalconyJH <balconyjh@gmail.com>
This commit is contained in:
@@ -110,11 +110,18 @@ class ApiDataSource:
|
||||
create_time__gte=now - timedelta(hours=now.hour),
|
||||
).count()
|
||||
# 群聊数量
|
||||
select_bot.group_count = len(await PlatformUtils.get_group_list(select_bot.bot))
|
||||
# 好友数量
|
||||
select_bot.friend_count = len(
|
||||
await PlatformUtils.get_friend_list(select_bot.bot)
|
||||
)
|
||||
try:
|
||||
select_bot.group_count = len(
|
||||
(await PlatformUtils.get_group_list(select_bot.bot, True))[0]
|
||||
)
|
||||
# 好友数量
|
||||
select_bot.friend_count = len(
|
||||
(await PlatformUtils.get_friend_list(select_bot.bot))[0]
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning("获取bot好友/群组信息失败...", "WebUi", e=e)
|
||||
select_bot.group_count = 0
|
||||
select_bot.friend_count = 0
|
||||
select_bot.status = await BotConsole.get_bot_status(select_bot.self_id)
|
||||
# 连接时间
|
||||
select_bot.connect_time = bot_live.get(select_bot.self_id) or 0
|
||||
|
||||
Reference in New Issue
Block a user