Auto Response System was created to grant users the ability to have Echo perform complex tasks.
Almost like a Bot Bootstrap system for Discord.
The idea came from my original bot Paradox which was released early 2016 when everyone wanted
"Custom Commands".
The Auto Response System is very unique and allows for people to make things we weren't even aware were possible. This is where A.R.S Masters are born.
There are two parts to the ARS System. The Trigger and the Response
For most cases the trigger will be the word you want echo to react to when people say it.
The response will be what Echo sends back to the user. This is where majority of ARS Keys are used.
.auto hello={init}
Response Here
The above rule will only work if the message is "hello"
.auto &hello={init}
Response Here
The above rule will find the word "hello" in a message.
.auto &{:}(\n)={init}
Response Here
The above rule detects a rule with mult-lines in it using Regex.
.auto (word1|word2)={init}
Response Here
The above rule will only work if word1 and word2 is detected
.auto <<HasPrefix?:Hello>>={init}
Hello to you too {/user}
Info: Basically this trigger will check all messagesParams key is one of the favorites in the system. It's the original key that allows you to catch someones input. Now there happens to be another key called {content} but that's for another time. Let's take a look at how we can use params in it's simplest form.
One of the neat things you can do is catch peoples text inside of a command.
And than you can handle that data inside of Echo's response to the user.
We make this possible by using the only ARS Key available inside of triggers.
.auto &.say {params}={init}
Hey You said {params} and let's do fun things with it below!
.auto &.say {params}={init}
Normal Text: `{params}`
Backwards: `{params:flip}`
No Text: `{striptext:{params}}`
No Numbers: `{stripint:{params}}`
.auto &.say {params}={init}
{split: }
You said `{/p0}` And also `{/p1}`
This will split your text into two by the delimiter which in this case is a space.
So from what you've learned so far, you're probably telling yourself
Hey, i could make a custom role command? Yes! You can. However..
Let's make sure by doing so. You don't allow your members to take your server over.
.auto &.role {params}={init}
{role:{params}} Alright {/user} you now have the role `{params}`
Why is this bad?: The command above is not restricted.auto &.role {params}={init}
{req:Admin}
{role:{params}} Alright {/user} you now have the role `{params}`
Yay! now the command is secured to only your Admins.
The cool thing is how echo handles a mention inside of a command
And what happens in the background, unless you restrict it yourself.
.auto &.role {params}={init}
{req:Admin}
{role:{params}} Alright {/user} you now have the role `{params}`
You Type: .role @User Role Name.auto &.role {params}={init}
{req:Admin}
{-mentions}
{role:{params}} Alright {/user} you now have the role `{params}`
No more Mentions! now if this command has a mention inside, Echo will ignore it completely..auto &fuck={init}
{kick}{/user} was kicked for swearing..
Why is this bad? because if they say Fuck and mention someone...uh oh...auto &fuck={init}
{-mentions}
{kick}{/user} was kicked for swearing..
Boom! Alright, now the user who just swore (regardless of mentions or not) will be kicked.Learn how to manipulate when Echo performs a task!
.auto .test={init}
{sleep:15s} Hey you had to wait 15 seconds before seeing this!
The power of Linking two or more rules together!
.auto .test={init}
Alright, Here we go!
{ars:rule2}
Now in the linked rule, we will add {arslock} this will prevent people running it manually..auto rule2={init}
{arslock} /* Deny manual runs. */
{sleep:15s}
And there it went!!!
.auto &.mute={init}
{role:Muted}{/user} has been muted.
{ars:unMute}
You type: .mute @User
.auto unMute={init}
{arslock}
{sleep:30m}
{take:Muted}Alright {/user} you can now talk.
Awesome! Now let's explain a little bit of what's happening above.
Statements will help you with many different possibilities
They allow you to tell Echo to stop, or go. Based on a condition.
Let's look at some examples below!
.auto &.say {params}={init}
:break unless params=Hello!
Hey, you said `Hello` :)
Now with the conditionals you can also have else conditions.
.auto &.say {params}={init}
:break unless params=Hello! >> Sorry, you need to type .say Hello
Hey, you said `Hello` :)
Pretty neat, so if you type .say Goodbye you will get the else response.auto &.say {params}={init}
{if:params == Hello}
Hey, you said `Hello` :)
Alright, now let's take a look at Dynamic Statements.auto &.say {params}={init}
Params.Hello?:Hey, you said `Hello` :)
Response.nil?:Sorry, you need to type .say Hello
Awesome! Now let's take a look at Complex Statements.auto .test={init}
use | general | noob-channel
{if(ischannel):
Hey, you typed this command in #general or #nooob-channel
} (else) {
{stop} /* tell echo to do nothing */
}
Now let's explain a little bit about above..auto .test={init}
use | general | noob-channel
{if(ischannel):
Hey, you typed this command in #general or #nooob-channel
}