aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2024-05-31 18:40:38 +0200
committerGravatar Joe Banks <[email protected]>2024-05-31 18:14:55 +0100
commit3ba33437f491485065cc3921d07a0b3745376c24 (patch)
tree14f6bbc3ec6cc0f0d7c82095389bc7bafe5778f5
parentAdd support for parsing system information (diff)
Correct parsing library information file
-rw-r--r--arthur/apis/systems/lib9front.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/arthur/apis/systems/lib9front.py b/arthur/apis/systems/lib9front.py
index e499147..a527a6e 100644
--- a/arthur/apis/systems/lib9front.py
+++ b/arthur/apis/systems/lib9front.py
@@ -16,6 +16,7 @@ def generate_blog_comment(blogcom: str) -> str:
words, for our purposes, this function matches or even exceeds Python
Discord's security requirements.
"""
+ fragment = random.choice(blogcom.split("|\n"))
# Complete output buffer
out = []
# Options of the current branch, of which one will be selected at random
@@ -25,7 +26,7 @@ def generate_blog_comment(blogcom: str) -> str:
# Whether we are in a {block|of|options} at the moment
in_block = False
- for char in blogcom:
+ for char in fragment:
if char == "{":
in_block = True
elif in_block and char == "|":