aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-09-06 03:15:01 +0200
committerGravatar Numerlor <[email protected]>2021-09-06 03:15:01 +0200
commite07febdbde4815466b161b535f4a5eaf3593f755 (patch)
tree85e018f73199f28d484380bea2314f10826e791a
parentMerge remote-tracking branch 'upstream/main' into tag-groups (diff)
Use a -inf default for comparison to skip containment check
-rw-r--r--bot/exts/info/tags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/tags.py b/bot/exts/info/tags.py
index 3d222933a..bcffb3b80 100644
--- a/bot/exts/info/tags.py
+++ b/bot/exts/info/tags.py
@@ -99,7 +99,7 @@ class Tag:
def on_cooldown_in(self, channel: discord.TextChannel) -> bool:
"""Check whether the tag is on cooldown in `channel`."""
- return channel in self._cooldowns and self._cooldowns[channel] > time.time()
+ return self._cooldowns.get(channel, float("-inf")) > time.time()
def set_cooldown_for(self, channel: discord.TextChannel) -> None:
"""Set the tag to be on cooldown in `channel` for `constants.Cooldowns.tags` seconds."""