43 posts / 1 project
User Guide: Aliases and PSAs
2 years, 1 month ago Edited by Alex Baines on Aug. 12, 2017, 5:03 p.m. Reason: mod_psa now supports regex + aliases
Aliases and PSAs allow you to make the bot say things so you don't have to.
In the case of aliases, you can create simple commands that make the bot give a canned response whenever a !command is said. PSAs are similar, but either respond automatically on a timer, or whenever a message contains a specific word/phrase.
If you're in your own twitch channel, or are whitelisted then you have permission to create/modify aliases & PSAs, as detailed here.
To create or update an alias, use \alias <key> <text>.
<key> is the word that will follow the exclamation mark for the new alias.
<text> is what the bot will respond with, don't add quotes unless you want them in the response.
This alias uses %t, which is one of the printf-style format sequences available.
This is a full list:
To remove an alias, use \unalias <key>
To view available aliases in a channel, use \lsa
To change the required permissions to use an alias, use \chamod <key> <permission>
<permission> is either NORMAL, WLIST, or ADMIN.
Note that ADMIN is not particularly secure, since it only requires WLIST permission to use this permission changing command...
Local vs Global Aliases
All the commands mentioned previously are local to the channel that they are used from. So if you create an alias called hello in #place_a, it won't be available
However there are an equivalent set of commands to create "global" aliases, that will be available in all channels on the same server. These are the same, but with an added 'g' character.
Here's a table:
Use them wisely.
Multiple keys for local aliases
Sometimes you might want an alias to be available via multiple keys. Copy pasting is an option, but if you want to update the text, you'd have to redo them all.
Fortunately there is a special syntax added by ChronalDragon to simplify this case.
When any one of the linked keys is updated, all the keys will recall the new text.
To create/update a PSA, use \psa+ <key> [options] <time>m <text>
<key> is a name you make up to identify the PSA, much like aliases
<time> is the cooldown in minutes, note the m that follows this is currently needed, i'm not exactly sure why though, so maybe I'll remove it soon...
[options] can one or more of the following:
Send the message every 20 minutes, if the stream is live
Send the message when someone says "keyboard" or "kbd" with a 5min cooldown
Recall the alias "!welcome" when someone says anything, with a 15min cooldown
Send the message when "alot" is said, and the stream is live, with a 10m cooldown
To remove a PSA, use \psa- <key>
To view a list of PSAs in the channel, use \psa
That should about cover it. If i've missed something, or you have questions, ask away below.