Fix bug that prevented multiple handler checks

This commit is contained in:
Ben 2019-06-21 01:49:46 +01:00
parent 5abc62ed1d
commit fb18ffe6d3

View File

@ -200,7 +200,7 @@ def cooldown(per=1.0, rate=1, bucket_type=BucketType.Default, callback=None):
def check(predicate): def check(predicate):
def decorator(handler_function): def decorator(handler_function):
if not hasattr(handler_function, 'checks'): if not hasattr(handler_function, '__checks'):
handler_function.__checks = [] handler_function.__checks = []
if not type(predicate) == FunctionType: if not type(predicate) == FunctionType: