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

#automation

Event automations

Ambassadors only

Do something when an event happens: post a message, run a command as the channel, or shout someone out. Events come from a channel on Twitch or Kick, a YouTube channel's uploads and streams, a feed: any RSS or Atom address, a Bluesky account, a GitHub repository's releases or a Steam game's news, or an anime on AniList and a game's records on Speedrun.com. Rules can test the event, like if:months>=12, and print its values, like {user}. Use "#automation events" for every event and its values, and "#automation sources" for every place events come from, with a rule to copy for each and the feed addresses of common sites.

Usage

#automation add <name> <event> [#channel or feed] [if:field>=value] [say:"text"] [run:"command"] [-so]

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

Arguments

  • action Optional Text

    What to do with automations, or events and sources to see what rules can listen to

  • rest Optional Text, the rest of the message

    The rule name, then for add its event and what it listens to: a #channel, a YouTube @handle or a feed

  • in:channel Optional Channel Bot admins only

    The channel whose automations to change.

Flags 10

  • if: Text

    Only fire when the event meets this, like months>=12, user=tatertots, title~speedrun or live=true. Ops: = != > >= < <= ~ (contains). Quote a condition with spaces whole: if:"title~speed run".

    #automation add <name> <event> if:months>=12
  • say: Text

    Post this message, with the event's values in {braces}. Give it more than once to post several.

    #automation add <name> <event> say:"text"
  • run: Text

    Run this command as the channel, without the prefix, and post what it answers. It runs with a normal user's level, never moderation, stream or potato commands, and takes names and numbers like {user}, never free text like {title}. Twitch only.

    #automation add <name> <event> run:"command"
  • -so Switch

    Shout out who the event is about, like the channel raided or the channel that went live. Twitch only, and I must be a moderator.

    #automation add <name> <event> -so
  • -a Switch

    Post the message as an announcement

    #automation add <name> <event> say:"text" -a
  • cooldown: Time-interval

    How long the rule waits before it can fire again, 5s at least

    #automation add <name> <event> cooldown:1m
  • burst: Text

    What a rule on a feed does when entries arrive faster than its cooldown lets them post. each, digest, latest: each posts every one, a cooldown apart; digest posts what waited as one message, {count} saying how many and {titles} listing them; latest posts the newest and passes over the rest. each by default.

    #automation add <name> <event> <feed> burst:digest
  • hold: Int

    How many entries may wait for a feed's rule that posts each, 1 to 100, 50 by default. When more wait, the oldest are skipped, and the rule's list entry says so.

    #automation add <name> <event> <feed> hold:10

Examples 13

Thank and shout out whoever raids you

RunningMushroom:#automation add raidthanks raided say:"Thanks for the raid @{user}!" -so
PotatBotat:Set raidthanks: on raided in potatochannel → say "Thanks for the raid @{user}!", shoutout (cooldown 5 seconds, fired 0x)

Thank big cheers

EvaporatingFridge324:#automation add bits cheer if:amount>=500 say:"{user} cheered {amount} bits PogChamp"
PotatBotat:Set bits: on cheer in potatochannel if amount>=500 → say "{user} cheered {amount} bits PogChamp" (cooldown 5 seconds, fired 0x)