Skip to content

Commit

Permalink
Merge pull request #40 from Ailitonia/patch-1
Browse files Browse the repository at this point in the history
Fix: Check info_list to avoid TypeError
  • Loading branch information
HibiKier authored Sep 7, 2021
2 parents 5d45a9c + 7db5b3b commit 0654324
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/pixiv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ async def _(bot: Bot, event: MessageEvent, state: T_State):
info_list, code = await search_pixiv_urls(keyword, num, page, r18)
if code != 200:
await pixiv_keyword.finish(info_list[0])
if not info_list:
await pixiv_keyword.finish("没有找到啊,等等再试试吧~V", at_sender=True)
await send_image(info_list, pixiv_keyword, bot, event)
logger.info(
f"(USER {event.user_id}, GROUP {event.group_id if isinstance(event, GroupMessageEvent) else 'private'})"
Expand Down

0 comments on commit 0654324

Please sign in to comment.