if not... and not chain in /logs command #195

Closed
opened 2025-12-19 08:16:28 -05:00 by sirdog3355 · 1 comment
sirdog3355 commented 2025-12-19 08:16:28 -05:00 (Migrated from github.com)

Right now, this exists:

chosen_lines = [
    line for line in reversed(list(open(log_file)))
        if not re.search(r"Loaded", line)
        and
        not re.search(r"^---", line)
        and
        not re.search(r"Synced", line)
        and
        not re.search(r"Hello, world!", line)
        and
        not re.search(r":INFO:discord.client: logging in using static token", line)
        and 
        not re.search(r"PyNaCl is not installed", line)
]

This was introduced in PR #164 and is... wild, to say this least. Desired functionality is to remove this if not... and chain and replace it with something more elegant.

Right now, this exists: ```py chosen_lines = [ line for line in reversed(list(open(log_file))) if not re.search(r"Loaded", line) and not re.search(r"^---", line) and not re.search(r"Synced", line) and not re.search(r"Hello, world!", line) and not re.search(r":INFO:discord.client: logging in using static token", line) and not re.search(r"PyNaCl is not installed", line) ] ``` This was introduced in PR #164 and is... wild, to say this least. Desired functionality is to remove this `if not... and` chain and replace it with something more elegant.
sirdog3355 commented 2025-12-22 01:01:39 -05:00 (Migrated from github.com)

Addressed in #199. Documentation updated; simply awaiting push to production. Closing as completed.

Addressed in #199. Documentation updated; simply awaiting push to production. Closing as completed.
Sign in to join this conversation.
No description provided.