Skip to content

Commit

Permalink
Minor change in message checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Torom committed Jan 13, 2024
1 parent d965f3e commit 0e42404
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,9 @@ def _check_messages(messages_section: dict) -> None:
if not isinstance(messages_section[subsection[0]], subsection[1]):
raise TypeError(f'`messages` subsection {subsection[2]}')

for message_name, message in messages_section.items():
if message.strip() == '!printeval':
print(f'Ignoring message "{message_name}": "!printeval" is not allowed in messages.')
messages_section[message_name] = None
if messages_section[subsection[0]].strip() == '!printeval':
print(f'Ignoring message "{subsection[0]}": "!printeval" is not allowed in messages.')
messages_section[messages_section[subsection[0]]] = None


def _init_lists(config: dict) -> None:
Expand Down

0 comments on commit 0e42404

Please sign in to comment.