diff --git a/skynet/frontend/telegram.py b/skynet/frontend/telegram.py index 15cdcec..ff30cc8 100644 --- a/skynet/frontend/telegram.py +++ b/skynet/frontend/telegram.py @@ -125,12 +125,15 @@ async def run_skynet_telegram( await bot.reply_to(message, resp_txt) - @bot.message_handler(commands=['img2img'], content_types=['photo']) + @bot.message_handler(func=lambda message: True, content_types=['photo']) async def send_img2img(message): chat = message.chat if chat.type != 'group' and chat.id != GROUP_ID: return + if not message.caption.startswith('/img2img'): + return + prompt = ' '.join(message.caption.split(' ')[1:]) if len(prompt) == 0: