Chunk joke body just in case

This commit is contained in:
Zeva Rose 2021-06-29 17:16:16 -06:00
parent af544974c6
commit 7284738162

View file

@ -68,8 +68,16 @@ class JokeCog(commands.Cog):
result["title"] = result["title"].replace(
match, html.unescape(match)
)
fields = [
Field("", result["body"], False),
body_chunks = []
for i in range(len(result["body"]), step=1024):
body_chunks.append(
Field(
"",
result["body"][i * 1024 : (i + 1) * 1024],
False,
)
)
fields = body_chunks + [
Field("Score", result["score"]),
# Field(
# "Created At",