Chunk joke body just in case
This commit is contained in:
parent
af544974c6
commit
7284738162
1 changed files with 10 additions and 2 deletions
|
@ -68,8 +68,16 @@ class JokeCog(commands.Cog):
|
||||||
result["title"] = result["title"].replace(
|
result["title"] = result["title"].replace(
|
||||||
match, html.unescape(match)
|
match, html.unescape(match)
|
||||||
)
|
)
|
||||||
fields = [
|
body_chunks = []
|
||||||
Field("", result["body"], False),
|
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("Score", result["score"]),
|
||||||
# Field(
|
# Field(
|
||||||
# "Created At",
|
# "Created At",
|
||||||
|
|
Loading…
Add table
Reference in a new issue