New! The Potato Stock Exchange is open. Get in early! New! Try the new dashboard!

#banphrase

Banphrases

Moderators only

Delete, warn, time out or ban whoever says a phrase in chat. A phrase is plain text, a wildcard with *, or a regex written /pattern/flags, ~/pattern/ or regex:pattern. Rules can test the sender and the message with if:, like if:badge!=subscriber, if:color=none, if:caps>=70 or if:age<7, and with no phrase they match any message that meets them, as spam filters. Built-ins are ready made rules to turn on, and rules can be shared on the Spud Market with their phrase hidden. Use "#banphrase fields" for every condition.

Usage

#banphrase add <phrase|/regex/> [action:10m|delete|ban|warn] [if:field>=value] [name:x]

<angle brackets> are required [square brackets] are optional flags change what it does

Arguments

  • action Optional Text

    What to do with banphrases

  • rest Optional Text, the rest of the message

    The phrase for add, else the rule's name and what the action takes

  • in:channel Optional Channel Bot admins only

    The channel whose banphrases to change.

Flags 20

  • name: Text

    The rule's name, by default the next free number

    #banphrase add <phrase> name:scam
  • action: Text

    What a hit does: delete, ban, warn (delete and a Twitch warning), log (only count it), or a timeout length like 600, 10m or 1h

    #banphrase add <phrase> action:ban
  • timeout: Time-interval

    Time out for this long, 10 minutes by default

    #banphrase add <phrase> timeout:1h
  • match: Text

    How a plain phrase matches: contains, word, exact, starts, ends, wildcard. Contains by default, wildcard when it has *

    #banphrase add <phrase> match:word
  • if: Text

    Only act when this holds, like caps>=70, badge!=subscriber,vip, color=none, months<3 or age<7. Give it more than once, all must hold. Ops: = != > >= < <=

    #banphrase add <phrase> if:badge!=subscriber if:color!=custom
  • steps: Text

    What each repeat offense does after the first, comma separated, like 1m,10m,ban

    #banphrase add <phrase> action:delete steps:1m,10m,ban
  • window: Time-interval

    How long an offense counts toward the next step, 1 hour by default

    #banphrase add <phrase> steps:10m,ban window:1d
  • reason: Text

    The reason Twitch shows, by default "Banphrase: <name>". The phrase itself is never shown

    #banphrase add <phrase> reason:"No self promo"

Examples 6

Time out anyone selling viewers for an hour

OverthinkingMuffin804:#banphrase add cheap viewers timeout:1h name:viewers
PotatBotat:Added banphrase viewers: A message that contains the phrase (any case) with lookalike letters and accents folded → timeout 1h

Ban a regex, as other bots write it

UploadingTurtle:#banphrase add /bigf[o0]llows?\.com/i action:ban
PotatBotat:Added banphrase 2: A message that matches a regular expression → ban