1
Fork 0
mirror of https://github.com/RGBCube/VReplBot synced 2025-05-31 13:18:12 +00:00
This commit is contained in:
RGBCube 2023-02-03 21:59:09 +03:00
parent 8c4d1c5c3e
commit ede57775f4

View file

@ -1,5 +1,6 @@
from __future__ import annotations
import json
from io import BytesIO
from typing import Literal, TYPE_CHECKING
@ -62,8 +63,7 @@ class Playground(
f"https://play.vlang.io/{type}",
data = { "code": code },
) as response:
body = await response.json()
print(body)
body = json.loads(await response.text())
text = sanitize_str_for_codeblock(body["output"])
if len(text) + 7 > 2000: