From 27a9e8051b074558a302ac297ec7758044dc65fd Mon Sep 17 00:00:00 2001 From: Numerlor Date: Mon, 19 Sep 2022 02:15:32 +0200 Subject: get rid of unnecessary check --- botcore/utils/cooldown.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'botcore') diff --git a/botcore/utils/cooldown.py b/botcore/utils/cooldown.py index 817f6947..28ad8795 100644 --- a/botcore/utils/cooldown.py +++ b/botcore/utils/cooldown.py @@ -129,12 +129,9 @@ class _CommandCooldownManager: separated_arguments = _SeparatedArguments.from_full_arguments(call_arguments) cooldowns_list = self._cooldowns.get( (channel, separated_arguments.hashable), - None + [], ) - if cooldowns_list is None: - return False - for item in cooldowns_list: if item.non_hashable_arguments == separated_arguments.non_hashable: return item.timeout_timestamp > current_time -- cgit v1.2.3