diff options
author | 2024-05-07 00:30:58 +0100 | |
---|---|---|
committer | 2024-05-07 00:30:58 +0100 | |
commit | 8cf56848131735f3fc95f602b0015fca987d1500 (patch) | |
tree | 82025e1482c4bde9b5d525296416ad027129d450 /arthur/exts/fun/devops_rules.py | |
parent | Bump kubernetes CI steps to latest version (diff) |
Update devops rules parsing
Diffstat (limited to 'arthur/exts/fun/devops_rules.py')
-rw-r--r-- | arthur/exts/fun/devops_rules.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arthur/exts/fun/devops_rules.py b/arthur/exts/fun/devops_rules.py index c214d4f..16f47e7 100644 --- a/arthur/exts/fun/devops_rules.py +++ b/arthur/exts/fun/devops_rules.py @@ -20,8 +20,10 @@ class Rules(Cog): async with self.bot.http_session.get(RULES_URL) as resp: resp.raise_for_status() raw_content = await resp.text() - parsed_content = raw_content.split("---")[-1].strip().split("\n") - + # Ignore markdown frontmatter + parsed_content = raw_content.split("---")[-1].strip() + # Ignore first 4 lines, as they are not the rules + parsed_content = parsed_content.split("\n")[4:] self.rules = {} for line in parsed_content: number, rule = line.split(".", maxsplit=1) |