Skip to content

Commit 7474ff3

Browse files
committed
delete messages when kicked by userbot yeeter
1 parent 06bccf5 commit 7474ff3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cogs/events.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from typing import TYPE_CHECKING
1414
from utils.checks import check_staff
1515
from utils.configuration import KillBoxState
16-
from utils.utils import send_dm_message, gen_color
16+
from utils.utils import send_dm_message, gen_color, scam_purge
1717
from utils import Restriction
1818
from utils.database import FilterKind
1919
from utils.views.generic import ignored_file_extensions
@@ -241,16 +241,18 @@ async def scan_message(self, message: discord.Message, is_edit=False):
241241
self.userbot_yeeter[message.author.id].append(message.channel)
242242
if len(self.userbot_yeeter[message.author.id]) == 3:
243243
if isinstance(message.author, discord.Member):
244+
await scam_purge(
245+
guild=message.guild,
246+
target_id=message.author.id,
247+
reason=f"userbot_yeeter: Suspicious behavior in multiple channels.",
248+
limit=10,
249+
)
244250
msg = (
245251
"You have been banned from Nintendo Homebrew for suspicious behavior in multiple channels. "
246252
"If you think this is a mistake contact <@159824269411352576> (frozenchen) on discord or send a email to staff@nintendohomebrew.com")
247253
await send_dm_message(message.author, msg)
248254
self.bot.actions.append(f'wk:{message.author.id}')
249-
await message.author.kick(reason="Suspiscious behavior in multiple channels.")
250-
try:
251-
await message.delete()
252-
except discord.errors.NotFound:
253-
pass
255+
await message.author.kick(reason="Suspicious behavior in multiple channels.")
254256
return
255257
else:
256258
self.bot.loop.create_task(self.userbot_yeeter_pop(message))

0 commit comments

Comments
 (0)