From 3ba33437f491485065cc3921d07a0b3745376c24 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Fri, 31 May 2024 18:40:38 +0200 Subject: Correct parsing library information file --- arthur/apis/systems/lib9front.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arthur/apis/systems/lib9front.py') 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 == "|": -- cgit v1.2.3