Module Bernard_j_ortcutt__Action
module Target : sig ... endmodule Automod_key : sig ... endmodule Action_buffers : sig ... endtype t=|Add_usernote of{level : string;text : string;}Add a Reddit Toolbox usernote to the target author with the corresponding level and text.
|Ban of{message : string;Message displayed to the user
reason : string;Reason available to moderators
duration : Bernard_j_ortcutt.Import.Api.Parameters.Relationship_spec.Duration.t;}Ban the target author.
|LockLock the target.
|NukeRecursively remove the target and its replies.
|Modmail of{subject : string;body : string;}Send a modmail to the target author.
|Notify of{text : string;}Reply to the target and distinguish the resulting comment.
|RemoveRemove the target.
|Watch_via_automod of{key : Automod_key.t;placeholder : string;}Add the
keyof the target to the subreddit's AutoMod config.This action finds
placeholderin the AutoMod config and adds the key after it, expecting that the placeholder is found in a YAML list.For example, if our key is "spez" and our placeholder is "do!not!remove", this action assumes a list like the following exists in the AutoMod config:
[do!not!remove, ketralnis, kn0thing]Afterwards, the list will look like this:
[do!not!remove, spez, ketralnis, kn0thing]The change is a simple textual replacement and does not try to parse markdown.
We recommend that placeholders contain a character that is legal neither in usernames nor in domains, such as '!'.
val act : t -> target:Target.t -> retry_manager:Bernard_j_ortcutt.Import.Retry_manager.t -> subreddit:Bernard_j_ortcutt.Import.Subreddit_name.t -> moderator:Bernard_j_ortcutt.Import.Username.t -> time:Core.Time_ns.t -> action_buffers:Action_buffers.t -> unit Async.Deferred.tval will_remove : t -> bool