mirror of
https://github.com/RGBCube/VReplBot
synced 2025-07-24 23:17:44 +00:00
fix
This commit is contained in:
parent
8c4d1c5c3e
commit
ede57775f4
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from typing import Literal, TYPE_CHECKING
|
from typing import Literal, TYPE_CHECKING
|
||||||
|
|
||||||
|
@ -62,8 +63,7 @@ class Playground(
|
||||||
f"https://play.vlang.io/{type}",
|
f"https://play.vlang.io/{type}",
|
||||||
data = { "code": code },
|
data = { "code": code },
|
||||||
) as response:
|
) as response:
|
||||||
body = await response.json()
|
body = json.loads(await response.text())
|
||||||
print(body)
|
|
||||||
text = sanitize_str_for_codeblock(body["output"])
|
text = sanitize_str_for_codeblock(body["output"])
|
||||||
|
|
||||||
if len(text) + 7 > 2000:
|
if len(text) + 7 > 2000:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue