r/AutoModerator • u/coloneljdog • Apr 26 '19
Avenger's End Game Spoiler Prevention Code
Here's some code I put together to attempt to prevent Marvel / End Game spoilers. Obviously this won't catch everything and people can still get around it, but at a minimum, it should prevent any spoiler copy pasta from being posted. If you feel any modifications should be made to this, please let me know. For those new to AutoMod, you should be able to copy the code below into your AutoMod config without needing to make any changes.
Note: There should be no spoilers within the code below. It is essentially a massive list of Marvel characters/items/actors.
---
# Avengers End Game Spoiler Prevention
type: any
title+body (regex): ['((doctor|dr\.?|incredible|proff?.?|proff?ess?or|she|the).?)?hulk', '(?-i:The (Collector|Hand))', '(?<!.{80})(?<!\bmy )(?<!\byour )end\W?game', '(?<!\ban )abomination', '(car|mar).vell?', '(defenders|avengers).?assembled?', '(doctor|dr)\.?\W?(doom|octopus)', '(doctor|dr\.?|hank|professor) p(i|y)m', '(happy|harold).?hogan', '(hope|hank|janet).?(v(a|o)n.?dyne|pym)', '(infinity|reality|soul|mind|space|time|power|stark).?(stones?|gems?|jewels?|gloves?|gauntlets?)', '(natash|natali)a?.?romano(va?|off)?', '(nick|nicholas).?fury', '(prof?f?.?|doc.?|professor|dr\.?|doctor|master|sorcerer|wizard|ste(ve|phe)n?).?strange', '(rocky|ranger|r(ock|ack|atch)et).?(the.?)?(racc?oo?n|rabb?it)', '(soul|power|reality|time|space|mind)\W?stones?', '(super|the)?s(c|k)rull?s?', '(super|winter).?soldier', '(the.?)?(dead|defeated|great|mad|purple).?titan', '(the.?)?kree', '(the\W?)?avengers?', '[ck]lement[ie]+f+', 'ancient.?one', 'ant.?man', 'ass?gu?ard(ian)?', 'benedict.?cumberbatch', 'big.?green.?guy', 'black.?(panther|widow(?!.?spider))', 'br[ie]{1,2}.?lars[eo]n', 'bradley.?cooper', 'brock.?rumlow', 'bruce.?bann?er', 'bucky(.?barnes?)?', 'cap([^i]\w*)?\W?(america|britain|marvel)', 'carol.?danvers?', 'chadwick.?boseman', 'chris\w*.?(evans|hemsworth)', 'clint(on)?.?barton', 'colossus', 'corvus.?gl[ai]+ve', 'cross.?bones', 'cull.?obsidian', 'daredevil', 'dark.?(patriot|phoenix)', 'deadpool', 'don.?cheadle', 'drax', 'dyne', 'ebony.?maw', 'eitri', 'elektra', 'elizabeth.?olsen', 'enchantress', 'enigma.?force', 'falcon', 'gamorr?a', 'gaunt', 'god.?of.?(mischief|thunder|trick)s?', 'gotg', 'grandmaster', 'green.?goblin', 'green.?rage.?monster', 'groo+t', 'guardians?.?of.?the.?galaxy', 'harley.?keener', 'hawk.?eye', 'heimdall', 'hela', 'heli.?carrier', 'howard.?the.?duck', 'hulk(ling)?', 'infinity.?(stones?|war)', 'iron.?fist', 'iron.?man(?!.{0,60}\b(training|triathlon))', 'iron.?patriot', 'iron\W?lad', 'james.?rhodes', 'jeremy.?renner', 'jigsaw(?!.puzzle)', 'josh.?brolin', 'kamar.?taj', 'karen.?gillan', 'kingpin', 'klaw', 'korg', 'lady.?sif', 'life.?model.?decoy', 'loki', 'luke.?cage', 'm.?baku', 'mantis', 'maria.?hill', 'mark.?ruffalo', 'marvel.?trinity', 'marvel\W?girl', 'meik', 'miss.?america', 'mjolnir', 'mr?s\W+marvel', 'mystic\W?arts', 'natasha', 'nebula(?!.award)', 'nick.?fury', 'nightcrawler', 'odin', 'odin\W?son', 'okoye', 'p(i|y)m\W?particle?', 'paul.?bettany', 'pepp?er.?pott?s?', 'peter.?(parker|quill)', 'professor\W?power', 'professor\W?x', 'proxima.?midnight', 'punisher', 'pym', 'quicksilver', 'red.?skull', 'rhodey', 'ring\W?portal', 'rob\w*.?downey', 'rocket.?raccoon', 'romanoff', 'ronin', 'sam(uel)?.?wilson', 'sanctuary.?(space|star)?ship', 'scarlett.?(johansson|witch)', 'scott?y?.?lang', 'sean.?gunn', 'shuri', 'silver.?surfer', 'sling.?(ring|portal)', 'sorcerer.?supreme', 'spider.?(wo)?man', 'stan\W?lee', 'star.?lord', 'ste(ve|phe)n?.*rogers?', 'storm.?breaker', 't(homas|om).?(hiddleston|holland)', 't.?chall?a?', 'thaddeus.?ross', 'thanos', 'the\W?(mandarin|snap|wasp|watcher)', 'thor', 'thor\W?girl', 'thor\Ws?.?hammer', 'thunder.?god', 'tilda.?swinton', 'tinkerer', 'tony.?stark', 'ultron', 'valk\w*r\w*[eiy]s?', 'van.?dyne?', 'venom', 'vibranium', 'victor.?shade', 'wakandan?s?', 'wanda.?maximo(ff?|v)', 'war.?machine', 'warlock', 'white.?wolf', 'winter.?soldier', 'wolverine', 'x\W?m[ae]n', 'zoe.?saldana']
action: remove
action_reason: 'Possible End Game Spoilers'
modmail_subject: 'Possible End Game Spoilers'
modmail: 'This [{{kind}}]({{permalink}}) has been removed due to being detected as possible Avengers: End Game spoilers (it contained keyword: >!{{match}}!<). Investigate at your own risk to confirm that this action was not made in error.'
---Edit 1: Removed the following code in order to prevent trolls from being notified that their posts were removed. However, I've left the modmail notification so that mods can double check that the code is working appropriately (at your own risk).
message_subject: 'Possible End Game Spoilers'
message: 'Your [{{kind}}]({{permalink}}) has been removed due to being detected as possible Avengers: End Game spoilers. If you believe this action was made in error, please [message the mods](https://reddit.com/message/compose?to=/r/{{subreddit}}).'Edit 2: Thanks to an anonymous contributor, I've updated the regex to a much more thorough and complete list!
Edit 3: Thanks for the gold!