Posts
Wiki

Basic Configuration

Floodgates reads configs in YAML, which is the same format used by automod, so if you know how automod-esque syntax works, you know how YAML works. If not, here are a few tutorials that might help: "YAML Syntax", "YAML for Non-programmers".

You might also use this YAML parser I found online to make sure something works before you put it in.

To update your subreddit's config, you will PM the bot a message with any subject and a body in the format UPDATE <subreddit name>.

Config Fields

NameDescriptionValid ValuesRequired?
timeframeThe timeframe in which the rule will be applied. Due to my laziness, minutes are not a valid time unit. Just do seconds and multiply by 60 or some shit.A number followed by a time unit. E.g., "4h", "1 week", etc.Yes
max_allowedThe maximum number of posts that users can make within the timeframe. If 0, no posts will be removed.Any integerYes
selfAllows the rule to only be applied to selfposts or linkposts. If a true value is given, only selfposts will be checked and vice versa. If no value is given, both types of post will be checked.BooleanNo
exempt_authorsUsers to whom the rule will not be applied. For if you have a post bot or just want someone to be able to post a lot for some reason.A list of stringsNo
exempt_flairsFlair template ids to ignore.A list of stringsNo
exempt_titlesTitle formats to ignore. Similar to automod regex.A list of strings or regexesNo
exempt_titles_modeCompilation mode for exempt_titles. Format like "includes regex" to be a pure regex applied to the title, "includes" to apply as text instead of regex, etc. Defaults to "includes-word".StringNo
banHow long to ban users for when violations occur. Enter a value of true to ban permanently. If not provided, no ban will be issued.Integer or booleanNo
ban_noteThe internal note to be provided with the ban. Will take the form Floodgates: note on your /about/banned page.Any string under 300 charactersNo
ban_messageThe message to be sent to users who are banned. Supports placeholders.Any stringNo
modmailA message to be sent to subreddit modmail whenever a violation is found. Supports placeholders.Any stringNo
modmail_subjectSubject for modmail. Supports placeholders except {{results}}. If modmail is set but not modmail_subject, the subject will be "Floodgates Violation - {{author}}".Any string under 300 charactersNo
report_reasonA string to report the post with. If not given, the post will not be reported. If remove is true, this will be ignored. Supports placeholders except {{results}}.Any string under 100 charactersNo
removeWhether to remove posts on violation. Defaults to true.BooleanNo
lockWhether to lock posts on violation. Defaults to false.BooleanNo
messageA message to be sent to the OP of a removed submission. Supports placeholders.Any stringNo
message_subjectSubject for PM. Supports placeholders except {{results}}. If message is set but not message_subject, the subject will be "Your post to /r/{{subreddit}} has been removed".Any string under 300 charactersNo
send_from_subredditWhether the message to the OP should be sent from the subreddit. Requires mail permissions. Defaults to false.BooleanNo
commentA comment to be posted on removed submissions. Supports placeholders.Any stringNo
comment_stickiedWhether the removal comment is to be stickied. Defaults to true.BooleanNo
ignore_deletedWhether to ignore posts that have been deleted by the OP when checking previous posts.BooleanNo
ignore_removedWhether to ignore posts that have been removed by a moderator when checking previous posts.BooleanNo
grace_periodHow long, in minutes, to wait before checking a post. If the post is deleted at the end of this period, the post will be skipped. By default, there is no grace period.IntegerNo

Placeholders

Several placeholders are supported by Floodgates in several of its possible messages. Unless otherwise specified, assume that all placeholders are available for the fields that support placeholders.

NameDescription
authorUsername of the post's author
subredditDisplay name of the post's subreddit
titleThe post's title
idThe post's id36
permalinkA permalink to the post
resultsA newline-separated list of up to 10 previous posts by the user within the timeframe
countThe number of posts the user has made within the timeframe

Example

The following is an example config which will remove posts and post a removal comment if the author has made more than 2 submissions in the last 24 hours, unless the post is deleted or removed:

max_allowed: 2
timeframe: 1 day
ignore_removed: yes
ignore_deleted: yes
modmail: |-
    /u/{{author}}, thank you for posting to /r/{{subreddit}}. Unfortunately your post has been removed because you have made more than 2 submissions in the last 24 hours. 

    Your previous posts:

    {{results}}