started building a scam message checker
This commit is contained in:
parent
0ae75441c9
commit
3ec2b90e8e
7 changed files with 59 additions and 3 deletions
3
checker/Checker.tscn
Normal file
3
checker/Checker.tscn
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[gd_scene format=3 uid="uid://i3rqbgerpgey"]
|
||||
|
||||
[node name="Checker" type="Node"]
|
||||
31
checker/checker.gd
Normal file
31
checker/checker.gd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_main_message_created(bot: DiscordBot, message: Message, channel: Dictionary) -> void:
|
||||
## analyse every message to detect if it is a scam message or not
|
||||
# text = message.content
|
||||
# images = message.attachments - its an array, so count the attachments
|
||||
# server join date = message.member["joined_at"]
|
||||
# could also keep track of how many messages the user has sent on the server and be more sensitive if its the first 5/10/20 or so
|
||||
# message.author.id , message.author.username
|
||||
# for any matches we find, we want to senda copy to the admin channel then delete the original copy and timeout the user
|
||||
|
||||
#print(message)
|
||||
print(message.guild_id)
|
||||
if message.author.id == "616872480371376128":
|
||||
# its fuzzy, lets try and time them out
|
||||
var until = "2025-12-05T00:00:00Z"
|
||||
bot.timeout_member(message.guild_id, message.author.id, until)
|
||||
|
||||
|
||||
pass # Replace with function body.
|
||||
1
checker/checker.gd.uid
Normal file
1
checker/checker.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://8yiff3da5cxh
|
||||
Loading…
Add table
Add a link
Reference in a new issue