randydev commited on
Commit
dd1dccd
Β·
verified Β·
1 Parent(s): e2ccc92

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -0
main.py CHANGED
@@ -93,7 +93,11 @@ async def searchhub(client: Client, message: Message):
93
  return await pro.edit_text("I don't understand, can you help me?")
94
  try:
95
  response = await api.x_search(query=query)
 
 
96
  link = response[0]
 
 
97
  file_path, thumb, _ = await api.x_download(url=link, is_stream=True)
98
  upload_text = f"**⬆️ π–΄π—‰π—…π—ˆπ–Ίπ–½π—‚π—‡π—€ video ...**"
99
  await pro.edit_text(upload_text)
 
93
  return await pro.edit_text("I don't understand, can you help me?")
94
  try:
95
  response = await api.x_search(query=query)
96
+ if response is None:
97
+ return await pro.edit_text("nothing found gay")
98
  link = response[0]
99
+ if link is None:
100
+ return await pro.edit_text("nothing found gay.")
101
  file_path, thumb, _ = await api.x_download(url=link, is_stream=True)
102
  upload_text = f"**⬆️ π–΄π—‰π—…π—ˆπ–Ίπ–½π—‚π—‡π—€ video ...**"
103
  await pro.edit_text(upload_text)