wop commited on
Commit
d31340b
·
verified ·
1 Parent(s): 704f32c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -228,9 +228,12 @@ async def search(ctx, *, query: str):
228
 
229
  verses = response.json()
230
  if verses:
 
 
 
231
  # If verses are found, concatenate them into a single message
232
- passage = "\n".join(verses)
233
- passage = truncate_response(passage)
234
  embed = discord.Embed(title=f"Search Results for '{query}'", description=passage, color=discord.Color.blue())
235
  else:
236
  embed = discord.Embed(title="Search Results", description="No results found.", color=discord.Color.red())
 
228
 
229
  verses = response.json()
230
  if verses:
231
+ # Extract text values from dictionaries
232
+ verse_texts = [verse["text"] for verse in verses]
233
+
234
  # If verses are found, concatenate them into a single message
235
+ passage = "\n".join(verse_texts)
236
+ #passage = truncate_response(passage)
237
  embed = discord.Embed(title=f"Search Results for '{query}'", description=passage, color=discord.Color.blue())
238
  else:
239
  embed = discord.Embed(title="Search Results", description="No results found.", color=discord.Color.red())