lunarflu HF staff commited on
Commit
d1c7f26
1 Parent(s): 4796db1

remove timeout for now

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -129,11 +129,14 @@ async def on_message(message):
129
  f"Message content: {message.content}\n"
130
  f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n"
131
  )
 
132
 
133
  # timeout for a week
134
  if spam_count >= timeout_threshold:
135
  try:
136
  member = message.author
 
 
137
  #await member.send("You have been temporarily timed out (7 Days) for spamming. If this was an error, message <@811235357663297546> or an `@admin`")
138
  await member.timeout(datetime.timedelta(hours=timeout_duration), reason="Spamming")
139
  except Exception as e:
@@ -144,12 +147,10 @@ async def on_message(message):
144
  print(f"{bot.user} timed out {message.author} for {timeout_duration} for Spam")
145
  await bot.log_channel.send(f" {alert} {bot.user} timed out {message.author} for {timeout_duration} for Spam")
146
 
 
147
  """
148
- if user_cooldowns[message.author.id]['count']/5 > cooldown_duration:
149
- # ping admins
150
- # timeout for user
151
- # kick user
152
- """
153
  user_cooldowns[message.author.id]['timestamp'] = message.created_at
154
 
155
  await bot.process_commands(message)
 
129
  f"Message content: {message.content}\n"
130
  f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n"
131
  )
132
+ """
133
 
134
  # timeout for a week
135
  if spam_count >= timeout_threshold:
136
  try:
137
  member = message.author
138
+
139
+ await guild.kick(member, reason="Spamming")
140
  #await member.send("You have been temporarily timed out (7 Days) for spamming. If this was an error, message <@811235357663297546> or an `@admin`")
141
  await member.timeout(datetime.timedelta(hours=timeout_duration), reason="Spamming")
142
  except Exception as e:
 
147
  print(f"{bot.user} timed out {message.author} for {timeout_duration} for Spam")
148
  await bot.log_channel.send(f" {alert} {bot.user} timed out {message.author} for {timeout_duration} for Spam")
149
 
150
+
151
  """
152
+
153
+
 
 
 
154
  user_cooldowns[message.author.id]['timestamp'] = message.created_at
155
 
156
  await bot.process_commands(message)