Change img2img msg handler on telegram frontend

pull/25/head
Guillermo Rodriguez 2023-01-16 00:42:48 -03:00
parent 493656dae1
commit 36ea39109b
1 changed files with 4 additions and 1 deletions

View File

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