mirror of
https://github.com/alterware/aw-bot.git
synced 2025-10-26 14:15:54 +00:00
chore: update spam detection method
This commit is contained in:
7
aw.py
7
aw.py
@@ -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}!"
|
||||
)
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user