Skip to content

Commit

Permalink
Fix: Check info_list to avoid TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailitonia authored Sep 6, 2021
1 parent 5eb6406 commit 7db5b3b
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 7db5b3b

Please sign in to comment.