lunarflu HF staff commited on
Commit
d53ecd5
1 Parent(s): c621f1b

if user_cooldowns[message.author.id]['count'] > 2: >> 3

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -61,7 +61,7 @@ async def on_message(message):
61
  user_cooldowns[message.author.id]['count'] += 1
62
 
63
  # tldr; if we post 2 messages with less than 1s between them
64
- if user_cooldowns[message.author.id]['count'] > 1:
65
  var1 = message.created_at
66
  var2 = user_cooldowns[message.author.id]['timestamp']
67
  print(f"seconds since last message by {message.author}: {(var1 - var2).total_seconds()}")
 
61
  user_cooldowns[message.author.id]['count'] += 1
62
 
63
  # tldr; if we post 2 messages with less than 1s between them
64
+ if user_cooldowns[message.author.id]['count'] > 2: # 3 in a row
65
  var1 = message.created_at
66
  var2 = user_cooldowns[message.author.id]['timestamp']
67
  print(f"seconds since last message by {message.author}: {(var1 - var2).total_seconds()}")