Reduce number of search results returned by Google custom search from 5 to 3

This commit is contained in:
2024-12-10 21:17:06 +07:00
parent 503961ba88
commit 51a243f9aa

2
bot.py
View File

@@ -307,7 +307,7 @@ async def search(interaction: discord.Interaction, query: str):
try:
# Perform Google search
search_results = google_custom_search(query, num_results=5)
search_results = google_custom_search(query, num_results=3)
if not search_results:
await interaction.followup.send("No search results found.")
return