lunarflu HF staff commited on
Commit
fc129e3
1 Parent(s): 5c2a6c2

still testing ban embed

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -152,6 +152,7 @@ async def on_member_update(before, after):
152
  @bot.event
153
  async def on_member_ban(guild, user):
154
  try:
 
155
  print("1")
156
  async for entry in guild.audit_logs(limit=5, action=discord.AuditLogAction.ban):
157
  print("2")
@@ -173,12 +174,15 @@ async def on_member_ban(guild, user):
173
  embed.add_field(name="Reason", value=reason, inline=False)
174
  embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
175
  print("5")
176
- await bot.log_channel.send(content=content, embed=embed)
 
177
  """
 
 
178
  # member banned from the guild
179
  embed = Embed(description=f'Member {user.mention} was banned from the guild', color=Color.red())
180
  await bot.log_channel.send(embed=embed)
181
- """
182
 
183
  except Exception as e:
184
  print(f"Error: {e}")
 
152
  @bot.event
153
  async def on_member_ban(guild, user):
154
  try:
155
+ """
156
  print("1")
157
  async for entry in guild.audit_logs(limit=5, action=discord.AuditLogAction.ban):
158
  print("2")
 
174
  embed.add_field(name="Reason", value=reason, inline=False)
175
  embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
176
  print("5")
177
+ await bot.log_channel.send(content=content, embed=embed)
178
+
179
  """
180
+
181
+
182
  # member banned from the guild
183
  embed = Embed(description=f'Member {user.mention} was banned from the guild', color=Color.red())
184
  await bot.log_channel.send(embed=embed)
185
+
186
 
187
  except Exception as e:
188
  print(f"Error: {e}")