Implement workflow for unauthorized access
Endogen opened this issue · comments
If a not authorized user tries to access the bot, right now he gets a message that access was denied and the owner of the bot gets a message that user with a specific ID tried to access the bot. But the unauthorizes user can still spam the bot - and thus the owner - with unwanted "access denied" messages.
New workflow should be (if message send):
First msg: Show message and return (already implemented)
Second msg: Block user (add to blacklist), send him and owner a message, return
Third msg: No message to anyone (log the attempt), return
Also, "access denied" messages should come up on every message and not only if a command is send(?)
After i looked into it, it would be an overkill to have the file blacklist.json
where blacklisted users would be stored. The purpose would be to not being spammed and that can also be accomplished by settings a rule in config.json
now (new rule name is show_access_denied
).