diff --git a/tgbot/shit/prompting.py b/tgbot/shit/prompting.py index c906f00..4dcea1b 100644 --- a/tgbot/shit/prompting.py +++ b/tgbot/shit/prompting.py @@ -39,8 +39,10 @@ async def ws_task(): message = await ws.recv() message_dict = json.loads(message) - prompt_id = message_dict["id"] - image_url = filename2cdn(message_dict["image_filename"]) + prompt = message_dict["data"] + + prompt_id = prompt["id"] + image_url = filename2cdn(prompt["image_filename"]) chat_id = scheduled_prompts.get(prompt_id) print(f"Received message: {message}")