From 6d136df3dd541fcaa24531331d7b2f639df8fae8 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 5 Feb 2023 12:37:40 +0300 Subject: [PATCH] oops --- v_repl_bot/cogs/playground.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v_repl_bot/cogs/playground.py b/v_repl_bot/cogs/playground.py index 1ee5069..f1bd8a2 100644 --- a/v_repl_bot/cogs/playground.py +++ b/v_repl_bot/cogs/playground.py @@ -1,6 +1,5 @@ from __future__ import annotations -import ast import json from io import BytesIO from typing import Literal, TYPE_CHECKING @@ -60,7 +59,7 @@ class Playground( f"https://play.vlang.io/run_test", 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"]