From 2aba2a0902da4f6576617fdd8dc2c5a3d24453cd Mon Sep 17 00:00:00 2001 From: japandotorg Date: Sun, 28 Jul 2024 22:35:02 +0530 Subject: [PATCH] [FreeloaderMode] disallow the bot from deleting messages --- freeloadermode/core.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/freeloadermode/core.py b/freeloadermode/core.py index e221890..573fb4c 100644 --- a/freeloadermode/core.py +++ b/freeloadermode/core.py @@ -304,7 +304,9 @@ async def _tempban( audit_reason: str = get_audit_reason(author, reason, shorten=True) # type: ignore try: - await guild.ban(member, reason=audit_reason) + await guild.ban( + member, reason=audit_reason, delete_message_days=0, delete_message_seconds=0 + ) except (discord.NotFound, discord.Forbidden, discord.HTTPException): return else: @@ -372,7 +374,12 @@ async def on_member_remove(self, member: discord.Member) -> None: if action.lower() == "ban": try: - await guild.ban(member, reason="Member left while freeloader mode was toggled.") + await guild.ban( + member, + reason="Member left while freeloader mode was toggled.", + delete_message_days=0, + delete_message_seconds=0, + ) except discord.NotFound: return else: