修改 plugins.post 在连接错误时直接退出

This commit is contained in:
洛水.山岭居室 2022-05-26 19:37:55 +08:00
parent 938978f0bf
commit 45fb62aad1

View File

@ -56,6 +56,7 @@ class Post(BasePlugins):
post_id = self.bbs.extract_post_id(update.message.text)
if post_id == -1:
await message.reply_text(f"获取作品ID错误请检查连接是否合法", reply_markup=ReplyKeyboardRemove())
return ConversationHandler.END
post_full_info = await self.bbs.get_post_full_info(2, post_id)
post_images = await self.bbs.get_images_by_post_id(2, post_id)
post_data = post_full_info.data["post"]["post"]