Skip to content

Autoresponses and trigger words

CarlGroth edited this page Jul 7, 2018 · 6 revisions
Name Args Example Usage
![ar|autoresponse] -- -- Lists the triggers, and ignores for the server
!ar [add|create] <trigger> <response...> !ar add "hello there" Hello! I'm a bot created by carl 💪 Adds a trigger that carlbot will look for and say/do something when it is said. This command looks for a substring within the message, meaning that if you add hi then this will also match. See the next command if that is too greedy for you.
!ar [strict|s|exact] <trigger> <response...> !ar strict "its coming home" reactu{⚽️} This works a lot like normal ar add with one vital exception: it looks for exact sequences of words, rather than substrings. What this means is that if you add the strict trigger hell and someone says hello it will not match, it also means that triggers with more than one word requires an exact match per word (this is a lot more reasonable to use than this text makes it out to be).
!ar [channel|cs] <trigger> <response...> !ar channel "king crimson" HOW DOES KING CRIMSON WORK I DON'T UNDERSTAND Like a normal autoresponse except it only listens in the channel you used the command in. Note: This will bypass any channel ignores (member ignores still work).
!ar ignore <channel(s) and or member(s)...> !ar ignore @Carl#0001 @Kintark#0588 #general @idiotuser#1337 #welcome Blocks channels and or users from triggering responses
!ar unignore <channel(s) and or member(s)...> !ar unignore #general @Carl#0001 Undoes what !ar ignore does

Autoreactions support a subset of tagscript.

Redirecting output redirect{#log}

If you want to send the message to the person who triggered it, see action blocks.

Random lists #{comma, separated,#{nested args}}

Unique random list variables #variablename{comma, separated, values}

Unlike random lists assigned to a variable through variable blocks, unique random lists randomly pick an element each time.

Math blocks m{1 + 1 / (3 ^ 9)}

Supports relatively advanced math.

+ - * / ^ % sin cos tan exp abs trunc round sgn log ln log2

React blocks react{:regional_indicator_f:} reactu{:regional_indicator_x:}

This will react to the response (react) or original message (reactu) with the emojis placed inside the brackets

50/50 blocks ?{Will anyone see me?}

Action blocks a{action} where action is pm or delete (or both, comma separated)

pm pms the content of the response to the user who triggered it

delete deletes the trigger message

Formatted time blocks strf{strftime}

Returns the current time formatted according to python's strftime, see http://strftime.org/ for more information.

Example: The current year is strf{%Y} hehe

variable assignment !{foo=This can be anything}

In addition to these blocks, it also comes with a few default arguments. These are:

$authorid - The ID of the person who triggered the response

$userid - The ID of the first mention or author if there aren't any

$user - Nickname of the first mentioned user or author if there aren't any mentions

$channel - The name of the channel mentioned or the channel the command was used in

$server - The name of the server

$mention - The nickname of the first mentioned user or NOTHING if there aren't any mentions

$nuser - The name of $user

$nmention - The name of $mention

$nauthor - The name of $author

$authorid - The ID of the author

$userid - The ID of the mentioned user if mentioned or the author if there aren't any mentions

$serverid - The ID of the server

$randommember - A random member's nickname

$randomonline - A random online member's nickname (online in this case means not-offline i.e. away and busy count as online)

$randomoffline - A random offline member's nickname

Clone this wiki locally