lunarflu HF staff commited on
Commit
8f73afd
1 Parent(s): 44aafd7

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -74,7 +74,7 @@ async def on_message(message):
74
  user_cooldowns[message.author.id]['count'] += 1
75
 
76
  # tldr; if we post 2 messages with less than 1s between them
77
- if user_cooldowns[message.author.id]['count'] > 2: # 3 in a row
78
  var1 = message.created_at
79
  var2 = user_cooldowns[message.author.id]['timestamp']
80
  print(f"seconds since last message by {message.author}: {(var1 - var2).total_seconds()}")
 
74
  user_cooldowns[message.author.id]['count'] += 1
75
 
76
  # tldr; if we post 2 messages with less than 1s between them
77
+ if user_cooldowns[message.author.id]['count'] > 3: # 4 in a row, helps avoid false positives for posting in threads
78
  var1 = message.created_at
79
  var2 = user_cooldowns[message.author.id]['timestamp']
80
  print(f"seconds since last message by {message.author}: {(var1 - var2).total_seconds()}")