Skip to content

Commit

Permalink
⚡ Improve image search logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wiseCirno committed Aug 24, 2024
1 parent 5a1d169 commit 659b768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/CoreFunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def search_and_reply(url):
search_task = AggregationSearch(proxy = self._proxy, cf_proxy = self._cf_proxy)
search_result = await search_task.aggregation_search(url)

if len(search_task.exception) == 2:
if search_task.exception and not search_result:
err_message = ''.join([f'{e}\n' for e in search_task.exception])
await update.message.reply_text(err_message)
return ConversationHandler.END
Expand Down

0 comments on commit 659b768

Please sign in to comment.