aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-06-27 16:17:49 -0700
committerGravatar MarkKoz <[email protected]>2020-06-27 16:17:49 -0700
commit50757197956e3bba99dc845cdc264d759cbc8a71 (patch)
tree07c05505d70f853ba5ec8984269eb20704e6e429
parentCode block: use config constant for cooldown (diff)
Code block: simplify channel cooldown dict creation
-rw-r--r--bot/cogs/codeblock/cog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/codeblock/cog.py b/bot/cogs/codeblock/cog.py
index 2576be966..63b971b84 100644
--- a/bot/cogs/codeblock/cog.py
+++ b/bot/cogs/codeblock/cog.py
@@ -55,7 +55,7 @@ class CodeBlockCog(Cog, name="Code Block"):
self.bot = bot
# Stores allowed channels plus epoch times since the last instructional messages sent.
- self.channel_cooldowns = {channel: 0.0 for channel in constants.CodeBlock.cooldown_channels}
+ self.channel_cooldowns = dict.fromkeys(constants.CodeBlock.cooldown_channels, 0.0)
# Maps users' messages to the messages the bot sent with instructions.
self.codeblock_message_ids = {}