chore: update spam detection method

This commit is contained in:
2025-02-03 18:55:20 +01:00
parent e69bda8985
commit 497ff30cfd
2 changed files with 11 additions and 0 deletions

7
aw.py
View File

@@ -406,6 +406,13 @@ async def on_message(message):
continue
if msg.author == message.author and msg.content == message.content:
current_time = aware_utcnow()
message_time = msg.created_at
time_difference = current_time - message_time
if time_difference >= timedelta(minutes=5):
continue
await message.channel.send(
f"Hey {message.author.name}, you've already sent this message in {channel.mention}!"
)

View File

@@ -58,5 +58,9 @@
{
"regex": "steam(\\s)*deck",
"response": "Are you wondering how to install our clients on the Steam Deck? Check out this guide: https://forum.alterware.dev/t/playing-alterware-on-linux-guide-desktop-handheld/1036"
},
{
"regex": "0x593A1A",
"response": "This is a known issue. Try to delete the players to reset your stats. This issue is known to happen to modded servers. You may try to join a non-modded server for the time being."
}
]