diff --git a/config.py b/config.py index 9abf92e..d64500e 100755 --- a/config.py +++ b/config.py @@ -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: