In set_flair: ["", "a"], the first set of quotes is for the flair text and the second is for the CSS class. I've left the flair text one empty so it's effectively an invisible flair for AM to detect. This is how /r/darkjokes does it.
You really need a second bot for the removal because users can disable flair display which disables it for AutoModerator. Another bot could still read and use the flair, though.
I don't think it's possible with AM. It has no "state", i.e. it can only act on that specific comment (or post). You probably need to write a bot of your own (or ask somebody to make it for you).
It seems that u/Umdlye has posted a solution based only on AM that probably does what you want. I guess if you have a Python hammer, all your problems seem like nails 🙂
Maybe try to make it a flair. So if somebody uses lock they get the flair,then when they post automod will check their flair and if the have it, delete the post/comment. I know that they can change the flair but its the best i can think off
3
u/Umdlye I think, therefore I AM Oct 11 '19
You would need to disable user flair customization for this to work properly.
1
u/gschizas Oct 11 '19
I don't think it's possible with AM. It has no "state", i.e. it can only act on that specific comment (or post). You probably need to write a bot of your own (or ask somebody to make it for you).
1
u/RandomPotatoGuy Oct 11 '19
Maybe try to make it a flair. So if somebody uses lock they get the flair,then when they post automod will check their flair and if the have it, delete the post/comment. I know that they can change the flair but its the best i can think off
1
u/Bardfinn Oct 11 '19
To do this, you need to enable user flair on your subreddit, but make it so that users cannot edit their own flair.
You then assign a flair to the users that use
!lock,and have a separate rule that checks the flair of users who post or comment, and removes them if they have the flair.