From a1cfae123afa0b36162e3bb9a64fce549801bbdd Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 23 Apr 2024 19:52:33 +0800 Subject: [PATCH] :bug: Fix post plugin send error to owner --- plugins/admin/post.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/admin/post.py b/plugins/admin/post.py index a07728eb..d36c31a9 100644 --- a/plugins/admin/post.py +++ b/plugins/admin/post.py @@ -118,11 +118,10 @@ class Post(Plugin.Conversation): except APIHelperException as exc: logger.error("获取文章信息失败 %s", str(exc)) text = f"获取 post_id[{post_id}] 文章信息失败 {str(exc)}" - for user in config.admins: - try: - await context.bot.send_message(user.user_id, text) - except BadRequest as _exc: - logger.error("发送消息失败 %s", _exc.message) + try: + await context.bot.send_message(config.owner, text) + except BadRequest as _exc: + logger.error("发送消息失败 %s", _exc.message) return buttons = [ [