maint: handle DMs

This commit is contained in:
2025-03-24 15:46:50 +01:00
parent 4b300e87ff
commit d38c861285

View File

@@ -32,6 +32,12 @@ ALLOWED_CHANNELS = [
SPAM_ROLE_ID = 1350511935677927514
async def handle_dm(message):
await message.channel.send(
"If you DM this bot again, I will carpet-bomb your house."
)
async def was_message_replied_by_bot(message, bot):
"""
Checks if a deleted message was replied to by a later message from the bot.
@@ -225,6 +231,10 @@ async def handle_message(message, bot):
if message.author == bot.user:
return
if message.guild is None:
await handle_dm(message)
return
# Too many mentions
if len(message.mentions) >= 3:
member = message.guild.get_member(message.author.id)