diff --git a/v_repl_bot/cogs/playground.py b/v_repl_bot/cogs/playground.py index 312b203..1ee5069 100644 --- a/v_repl_bot/cogs/playground.py +++ b/v_repl_bot/cogs/playground.py @@ -1,6 +1,7 @@ from __future__ import annotations import ast +import json from io import BytesIO from typing import Literal, TYPE_CHECKING @@ -50,7 +51,7 @@ class Playground( f"https://play.vlang.io/run", data = { "code": code }, ) as response: - body = ast.literal_eval(await response.text()) + body = json.loads(await response.json(encoding = "utf-8")) return body["ok"], body["output"]