Code Monkey home page Code Monkey logo

echo's Introduction

Table of References

Link Information
Echo Commands Echo Commands Page
Echo ARS Echo ARS Page
Echo Intralink Echo Intralink Page
Echo Youtube Channel Youtube Help Videos
Echo R.P.G Game An R.P.G Text based game coded with Echo!
A.R.S Builder Coming back soon!

Easy Mode!

Is all of this too much? Just want the commands you see below with ease?
We have a few files with some preset commands! All you have to do is..
Step 1: Download one of the snippet files you want in Easy Scripts Folder
Step 2: Drag the file(s) you want into a channel Echo has permissions to read messages in.
If all went well, you will see the new commands listed under the file you uploaded.
And available for you to use!

ARS Intralink Is Here!!

The Intralink takes the ARS to a whole new level.
Here's a short description (But visit the site in our Table of References above)
The Intralink is a way to share an ARS file on any server or in Echo's DM with a unique Address
Almost like the internet. Except with the Intralink addresses look like ars://Intralink
A few live links (ars://Servers, ars://DragonWars, ars://economy).
Connect to an Address Via Echo DM: Just DM the address to echo (You will see a topic when it works)
Connect an Address to a channel in your server: Type: .lockprofile ars://AddressHere you will see a topic when it works
Connect to a password protected address Type: ars://AddressHere:PasswordHere
You can register up to 10 Addresses at a time and you can password protect them.
Want more information? And all the commands? Echo Intralink

Table of Contents

Link Information
A.R.S Etiquette Learn how to properly format your A.R.S!
Discord Events Learn how to link Echo to your Discord Events!
A.R.S Profiles Learn how to have multiple A.R.S DB's
Echo 4 Devs Learn how to send your guild info to your websites!
Regex Triggers Learn how to use Pure Regex with Echo!
Using If Statements Learn how to use If Statements with Echo.
A.R.S Profile locking Learn how to lock A.R.S Profiles to channels.
A.R.S Error Reporting Learn how to reveal A.R.S Errors
A.R.S Functions Learn how to simplify your A.R.S With Functions!
Dynamic Statements More simple and dynamic statements!
Global Variables Learn how to make your A.R.S more Simple with Variables!

You can grab a channels id by typing .channelid in the channel.
Or enabling Developer Mode in your Discord User Settings Panel

Auto Response System 101

Here are some examples to help you along.

You can use the {params} key in the trigger to catch their text!

.auto &.giveme {params}={init}
{role:
   {params}
}{req:Owner}
{notreq:
   {/user} You're not the owner
}
You've assumed the role {params}

The example above requires you to have the role Owner and will give you
whatever role you type (As long as the role exists) for example: .giveme Staff

If you want to use regex you add the & key before the word Example Below:
.auto &word={init}The Response here!

Ok, now let's look at the Response section and all the keys you can use!
Keys are surrounded by obraces. {key} Echo will replace these keys with data!
Here's tons of examples:
You can view the list of A.R.S Keys at Echo's Website!

A.R.S Examples.

You can view the [Public A.R.S Library](https://webm.xtclabs.net} Click Tools->A.R.S.

USING THE {PARAMS} KEY

Steps You Type
Make Command .auto &.sayhi {params}={init}Your Message: {params}
Use Command: .sayhi hey guys!

PREVENT MULTI-LINE MESSAGES WITH REGEX!

.auto &{:}(\n)={init}
use | YOUR-CHANNEL-ID
{if(ischannel):
    {del}Whoa {/user}.. Not in here
} (else) {
    {stop}
}

First you need to replace YOUR-CHANNEL-ID with whatever channel you want to prevent multi-line chat.
Basically what this does is. If Echo senses any multi-line (where they hit shift+enter)
He will remove their message and display a message letting them know.
Notice This doesn't remove long messages in a single line. Only if they hit (shift+enter)

EMBEDS

You can also make the A.R.S. print out an entire embed. An example of an embed containing all its options:

{embed:
	{title:}
	//Insert the title here
	{type:rich}
	//This is always rich as discord does not have any other types
	{author|name:}
	//Insert the author name (={user}) here
	{author|icon:}
	//This can be used to display a little picture next to the author name
	{author|url:}
	{color:}
	//Insert a colour here (HEX-colors only)
	{thumb|url:}
	//Inserts a small picture in the top right of the embed, can be replaced with {usericon} or related
	{desc:}
	//Your entire description goes here, again {user}, {/user} and related can be used
	{footer|icon:}
	//An icon url goes here ({usericon} or related can also be used) This icon will be displayed at the bottom of the embed
	{footer|text:}
	//Text that should go alongside the {footer|icon:} goes here
}

SERVER INFO COMMAND

Alright let's make a "Server Info" command! We will be using an embed in this example.

in your server type this exactly:

.auto .server={init}
{embed:
    {title:Information for {guild|name}}
    {type:rich}
    {author|name:{owner|name}}
    {author|icon:{owner|avatar}}
    {author|url:{owner|avatar}}
    {color:
        {randlist:
             #ff0000,#00ff00,#ffffff,#4286f4,
             #f45642,#262525,#e2d626,#87e226,
             #26e2c0,#2633e2,#8126e2
        }
    }
    {thumb|url:{guild|icon}}
    {desc:
───────────────────────
× ID:                     {guild|id}
× Region:             {guild|region}
× OwnerID:        {owner|id}
× Discord Icon:  [Click to view Guild Icon]({guild|icon})
× Members:       {membercount}
× Channels:        {channelcount}
× Roles:               {rolecount}
───────────────────────
    }
    {footer|icon:https://xtclabs.net/img/favicon-new.png}
    {footer|text: Echo 2.0 A.R.S}
}

Now when you type .server Echo will display the server information.
You can set it up to list all the channels, roles & the server prefix. all that stuff!
Server Example

WHOAMI COMMAND

.auto .whoami={init}
{embed:
    {title:User Information for {guild|name}}
    {type:rich}
    {author|icon:{usericon}}
    {author|name:{/user}}
    {color:
        {randlist:
             #ff0000,#00ff00,#ffffff,#4286f4,
             #f45642,#262525,#e2d626,#87e226,
             #26e2c0,#2633e2,#8126e2
        }
    }
    {thumb|url:{guild|icon}}
    {desc:
Bot Master: *{ismaster}*
Discord Icon: [Click here for Icon]({usericon})
Discord ID: *{rawid}*
Roles: *{listroles}*
    }
    {footer|icon:https://xtclabs.net/img/favicon-new.png}
    {footer|text: Echo 2.0 A.R.S}
}

now just type .whoami

Embeds with Multiple Fields!

.auto .echo={init}
{embed:
    {type:rich}
        {color:
            {randlist:
                #4286f4,#ff0000,#00ff00,
                ##e8f442,#f49e42,#000000
            }
        }
    {image|url:https://xtclabs.net/img/EchoIcon.jpg}
    {image|width:250}
    {image|height:250}
    {field[0]|name:Echo}
    {field[0]|value:[Echo Official Website](https://proxikal.github.io/Echo/Commands "The Official website for Echo 2.0")}
    {field[0]|inline:true}
    {field[1]|name:Echo Help}
    {field[1]|value:[Echo Documentation](https://github.com/proxikal/Echo "Learn how to use Echo A.R.S Through some Examples.")}
    {field[1]|inline:true}
    {field[2]|name:PHP Webhooks}
    {field[2]|value:[Github Page!](https://github.com/proxikal/discordphp-webhook "Use discord webhooks with ease using DiscordPHP-Webhooks")}
    {field[2]|inline:true}
    {footer|text:Requested by: {/user}.}
    {footer|icon:{usericon}}
}

now just type .echo You are allowed 10 fields. field[0] through field[9]

Adding Random responses and colors

For now we've added a lazy way to use multiple {randlist} keys.
However it's only limited to two {randlist} and {randlist2}
this will change to allow for multiple randlists, here is an example

.auto .gift={init}
{embed:
    {title:Something Something Darkside..}
    {type:rich}
    {author|name:{/user}}
    {author|icon:{usericon}}
    {author|url:{usericon}}
    {color:
        {randlist:
             #ff0000,#00ff00,#ffffff,#4286f4,
             #f45642,#262525,#e2d626,#87e226,
             #26e2c0,#2633e2,#8126e2
        }
    }
    {thumb|url:{guild|icon}}
    {desc:
        {randlist2:
            This should be a response,
            Along with this!,
            and now some more,
            Two Step, One Jump!,
            Live long!
        }
    }
    {footer|icon:https://xtclabs.net/img/favicon-new.png}
    {footer|text: Echo 2.0 A.R.S}
}

Now when you type .gift you will get random responses.
the more responses, the better!

IF STATEMENTS

If statements are used to determine wether or not a requirement is met and they are a very powerful tool for all coders, Echo has an IF statement system as well! There are multiple types, lets sum them up shall we?

General use

An if statement must contain three things, an "if-parameter", an "if-success-case" and an "if-fail-case". The if-parameter defines what will be checked, this depends on what type of if statement is being used. the if-success-case is basically a simple output that will be executed when the if statement succeeds, if it fails, the if-fail-case will be executed instead. You can use the {stop} key to make it do nothing. An example:

.auto .test={init}
use | IF-PARAMETER-HERE
{if(IF-TYPE-HERE):
    Success!
} (else) {
    Fail!
}

NOTE: If you want to use multiple if-parameters you must divide all parameters with | Example: use | param1 | param2 | param3

If type: Channel

When using this type of if statement, the success case will be executed only when the statement is executed from one of the set channel ID's (You can obtain the channel id by typing: .channelid ). The type is named ischannel An example:

.auto .test={init}
use | YOUR-CHANNEL-ID-HERE | OPTIONAL-EXTRA-CHANNEL-ID-HERE
{if(ischannel):
    The command was executed in one of the set channels
} (else) {
    The command was not executed in one of the set channels
}

If type: User

To use this you need to set one or multiple user ID's (obtained via right-clicking the user, then selecting "Copy ID"), the success case is executed when the user is one of the set users, otherwise the fail case is executed. Its name: isuser An example:

.auto .test={init}
use | USER-ID-HERE | OPTIONAL-EXTRA-USER-ID-HERE
{if(isuser):
    You are one of the set users
} (else) {
    You are not one of the set users
}

If type: Role

The success case is executed if the user has one of the roles that match the set roles, to set roles you must use role names. This is casesensitive. The name: hasrole An example:

.auto .test={init}
use | ROLE-NAME-HERE | OPTIONAL-EXTRA-ROLE-NAME-HERE
{if(hasrole):
    You have one of the set roles!
} (else) {
    You don't have one of the set roles!
}

Note:

There are a few more if types, you can find those here

Echo's A.R.S Is not a good way to filter out words.

There is a Rate Limiter Governing the A.R.S, So when someone spams fuck echo takes time to catch up.
So Only use the below example if you really need to. Otherwise just use Echo's WordFilter command

WORD FILTER EXAMPLE:

Steps You Type
Make Command .auto &fuck={init}{del}{pm}{kick}You've been kicked for swearing.
If Typed The message gets deleted and echo will send a pm of the above message.

GET ALERTS ON TRIGGERS

Steps You Type
Make Command .auto &<@YOURIDHERE>={init}{alert:YOURIDHERE}I have alerted Proxy!
If Typed Echo will private message you and let the user know.
You can get your id with .getid @User

CUSTOM .getid COMMAND:

Steps You Type
Make Command .auto &.grabid {params}={init}{rawid}The user's ID: {params}
Use Command .grabdid @User

{rawid} is required along with {params} to display another users ID.

Build the .meme or .jokes command

These commands were taken offline when our xtclabs.net site went down
We will be working on a new version of both keys eventuall.

Build the .giphy command in your server.

Steps You Type
Make Command .auto &.giphy {params}={init}{giphy}
Use Command .giphy keyword here
({giphy} Does not require {params} key in the response like most keys.)
Just make sure you've placed the {params} key in the trigger as shown above!

Build the .giveme command in your server.

.auto &.giveme {params}={init}
{role:
	{params}
}{req:Owner}
You've assumed the role **{params}**

Important: Make sure you add a req or exc key when dealing with the above.
You DO NOT want everyone to have have access to this command.

Steps You Type
Use Command .giveme Role Name

Build the .boobs and .ass commands

Steps You Type
Make Command .auto .ass={init}{ass}
Use Command .ass
Steps You Type
Make Command .auto .boobs={init}{boobs}
Use Command .boobs

MAKE AN ANNOUNCE COMMAND:

Steps You Type
Make Command .auto &.announce {params}={init}{redirect:CHANNELID}**ANNOUNCEMENT:** *{params}*
Use Command .announce What's up!

echo's People

Contributors

jurrijnp avatar proxikal avatar tsjiptsjip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

echo's Issues

Parsing error

By accident, during adding ARS trigger({:}.adres.), I forgot '&' before '{:}'. Now I can't use .viewauto .delauto .wipeauto, all of these result in

error parsing regexp: missing argument to repetition operator: *
Your regex format needs to be golang found here: https://regex101.com

Trying to delete this trigger, without & result in

The trigger: {:}.adres. was not found in your default autoresponse file.

How to fix it? ^^;

Deprecated

<td>remind</td><td>Sets a reminder in your server.</td><td>remind 5s message</td><td>Commanders</td></tr>

This command had been deprecated and is still listed. Please remove.

Needing help with echo and role management

So i saw that is this is related to another issue that was posted a while back but I'm having trouble with understanding the commands and stuff. I have two issues.
The first being: is that I want to have 'roles' that are base on games that members of my discord play and can assign themselves so that every time someone joins i dont need to manually have to assign that role and it would stop people from @everyone when looking for people to play said game.
Second issuse: hiding a channel for person that doesn't have a role that corresponds with a said role, am i able to do that with echo or is that something that i have to do throught discord itself.

{delme:5s} doesn't work if deleting auto-response message with {embed}

I realize that when creating auto response with {delme:5s} the echo bot doesn't delete the message if there's an {embed} but will delete just fine if it doesn't have embed or if using {delme} without time parameter.

  1. ARS with {embed} and {delme:5s} -> Doesn't work
  2. ARS with {embed} and {delme} -> Working
  3. ARS without {embed} and with {delme} / {delme:5s}-> Working

To re-create the issue:

?auto ?test={init}
{delme:5s}
{embed:
	{type:rich}
	{field[0]|name:Test delete after 5s}
	{field[0]|value:test}
	{footer|text:Requested by: {/user}.}
}

self-assign roles based on games played

I would like any user to be able to self-assign an empty role to indicate which games they play, and query the complete list of game-related roles. How can I accomplish this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.