|
|
@@ -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:
|