TheHamkerCat hace 5 años
padre
commit
ee4964b8d3
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      wbb/modules/images.py

+ 3 - 2
wbb/modules/images.py

@@ -38,8 +38,9 @@ async def wall(_, message):
     initial_term = message.text.split(None, 1)[1]
     m = await message.reply_text("Searching!")
     term = initial_term.replace(' ', '%20')
-    wallpapers = await arq.wall(term)
-    if not wallpapers:
+    try:
+        wallpapers = await arq.wall(term)
+    except KeyError:
         await m.edit("Found literally nothing!,"
                      + "You should work on your English.")
         return