txlyre 6 zile în urmă
părinte
comite
75f35b033b
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      commands.py

+ 3 - 1
commands.py

@@ -1103,6 +1103,7 @@ mime_table = {
 async def wand_handler(bot, event, command):
     media = None
     is_document = False
+    is_wsp = False
 
     if event.photo:
         media = event.photo
@@ -1121,12 +1122,13 @@ async def wand_handler(bot, event, command):
     if media is None:
         image = b"\x89WSP\r\n\x1a\n" + pack("!BHHBBBB", 0x63, 128, 128, 0, 0, 0, 0)
         is_document = True
+        is_wsp = True
     else:
         image = await bot.download_media(media, file=bytes)
 
     program = command.args_string
 
-    if program:
+    if not is_wsp and program:
         err, image = await wandscript(image, program)
 
         if err is None: