auto scam detection + kick#46
Conversation
hannibal002
left a comment
There was a problem hiding this comment.
overall interesting idea, but the broad design needs more thoughts ig
| event.message.delete().reason("Detected Scam. $foundScamWords").complete() | ||
| val embedBuilder = EmbedBuilder() | ||
| embedBuilder.setColor(Color.RED) | ||
| embedBuilder.setTitle("SkyHanni Server Kick") |
There was a problem hiding this comment.
instead of a kick, how about we just quarantine them via the new thingy?
There was a problem hiding this comment.
Idk what you mean with that.
There was a problem hiding this comment.
also quarantine means that things have to be handled by staff. kicking means if its a legit user they just can come back.
|
|
||
| object AutoScamDetect { | ||
| fun ocrImageText(imageFile: File, lang: String = "eng"): String { | ||
| val tesseract = Tesseract() |
There was a problem hiding this comment.
this is a slow action, running on the bot main thread. this will slow down/delay all other events the bot wants to listen/deal with
There was a problem hiding this comment.
uh i didnt see any async code for this project? how should i integrate this?
| embedBuilder.build() | ||
| )?.complete() | ||
| } catch (_: Throwable) { | ||
| //might have send another message before and got kicked already... |
There was a problem hiding this comment.
I expect errors to be thrown due to Discord being asznc for us causing issues if a not sends 2 messages quickly. So I have to eat them no?
There was a problem hiding this comment.
additional problems could be if a user blocks the bot and so on. finding all possible errors is probably not worth it. if its fails well so it does. adding log for it maybe. but its probably irrelevant.
I had the idea of using ocr to auto detect and
bankick users.