add author to search result display

This commit is contained in:
Arthur Lu 2022-08-25 03:46:41 +00:00
parent a3322c22f8
commit 08f14235e9

View File

@ -28,7 +28,8 @@ def get_search_results(query, results):
lst = ""
for i in range(0, min(10, len(results))):
title = results[i].title
lst += "{0}: {1}\n".format(str(i), title)
author = results[i].author
lst += "{0}: {1} | {2}\n".format(str(i), author, title)
if lst == "":
lst = "no results"
emb.add_field(name="{0} results found: ".format(len(results)), value=lst)