Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
on_member_ban fix test
Browse files
app.py
CHANGED
@@ -276,8 +276,13 @@ async def on_member_ban(guild, banned_user):
|
|
276 |
embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
|
277 |
|
278 |
#user = bot.get_user(811235357663297546)
|
279 |
-
dm_message = await banned_user.send(f"You've been banned from the Hugging Face Discord. To appeal, reach out to <@811235357663297546> via DM")
|
280 |
await bot.log_channel.send(content=content, embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
except Exception as e:
|
283 |
print(f"on_member_ban Error: {e}")
|
|
|
276 |
embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}")
|
277 |
|
278 |
#user = bot.get_user(811235357663297546)
|
|
|
279 |
await bot.log_channel.send(content=content, embed=embed)
|
280 |
+
|
281 |
+
try:
|
282 |
+
dm_message = await banned_user.send(f"You've been banned from the Hugging Face Discord. To appeal, reach out to <@811235357663297546> via DM")
|
283 |
+
except Exception as e:
|
284 |
+
print(f"Could not send DM to banned user: {e}")
|
285 |
+
|
286 |
|
287 |
except Exception as e:
|
288 |
print(f"on_member_ban Error: {e}")
|