Unsafe characters checking statement is now moved into the @register decorator. It is no longer necessary to wrap the whole module code into an if statement. This also makes userbot more consistent, as lots of modules were missing the unsafe characters check or having it in a different way.
ignore_unsafe argument is added to @register decorator for modules which use a different pattern.
modules/pmpermit.py:
Fixed .block command not blocking the user even though it told it did. Cleaned up the code.
Minor changes:
Removed @errors_handler decorator from non-outgoing commands, so it doesn't throw errors without user's interation.
Added @errors_handler to some commands which missed them.
P.S. Please don't squash this PR, leave commits intact, so reverting will be easy if worse comes to the worst. The changes are fully tested though.
events.py:
modules/pmpermit.py:
Minor changes:
P.S. Please don't squash this PR, leave commits intact, so reverting will be easy if worse comes to the worst. The changes are fully tested though.