aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Iddo Soreq <[email protected]>2020-03-07 09:35:40 +0200
committerGravatar GitHub <[email protected]>2020-03-07 09:35:40 +0200
commit34ef0991c9418ac04d9b6cf24a8381d9c4918540 (patch)
treeadaf225e1c71e96c87524f9ed5579645859b013c
parentBoolean Logic fix (diff)
Update bot/cogs/tags.py, cleaner return logic
Co-Authored-By: Shirayuki Nekomata <[email protected]>
-rw-r--r--bot/cogs/tags.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py
index e36761f85..fdd7bb8ec 100644
--- a/bot/cogs/tags.py
+++ b/bot/cogs/tags.py
@@ -100,16 +100,14 @@ class Tags(Cog):
"""
now = time.time()
- cooldown_conditions = (
+ is_on_cooldown = (
tag_name
and tag_name in self.tag_cooldowns
and (now - self.tag_cooldowns[tag_name]["time"]) < Cooldowns.tags
and self.tag_cooldowns[tag_name]["channel"] == ctx.channel.id
)
- if cooldown_conditions:
- return True
- return False
+ return is_on_cooldown
async def display_tag(self, ctx: Context, tag_name: str = None) -> bool:
"""