aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar F4zii <[email protected]>2020-03-07 09:36:26 +0200
committerGravatar F4zii <[email protected]>2020-03-07 09:36:26 +0200
commit9a00d703c1b8b19ab711f819b63d2a7a03a83eb1 (patch)
tree06d951d7994d1eda995ae800416fe8da86bf7a1d
parentReturn True after a tag suggestion was sent (diff)
parentUpdate bot/cogs/tags.py, cleaner return logic (diff)
Merge branch 'feat/F4zi/CommandSuggestion' of https://github.com/python-discord/bot into feat/F4zi/CommandSuggestion
-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 5124fb5e7..90747add4 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:
"""