mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 03:55:26 +00:00
🐛 Fix post plugin send error to owner
This commit is contained in:
parent
53cb3b53b5
commit
45df5e2cc3
@ -120,11 +120,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 = [
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user