From 3f0a6c52371b913172d4d71c8c253bb007ce3d5d Mon Sep 17 00:00:00 2001 From: miraai Date: Thu, 11 Aug 2016 15:32:15 +0200 Subject: [PATCH] Update Custom Reactions.md --- docs/Custom Reactions.md | 87 +++++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 20 deletions(-) diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md index a4c39f29..4ae4b1ef 100644 --- a/docs/Custom Reactions.md +++ b/docs/Custom Reactions.md @@ -1,21 +1,68 @@ -**After you add/delete custom commands, you should restart the bot. (either by typing `.restart` if you are on WINDOWS or just manually restarting if you prefer/are on other platform)** +

Custom Reactions +![Imgur](http://i.imgur.com/VtL9Omo.png "@Nekai :P takes you to the nadekobot website")

+###

Every time you add or remove a custom reaction you will need to restart your bot with either .restart if you are hosting or Nadeko is on VPS, or .die if Nadeko is on Droplet

+

Important

+ +

Commands and Their Use

+ + + + + + + + + + + + + + + + + + + + + + + + +
Command NameDescriptionExample
.acrAdds a Custom Reaction.acr Hello Hi!
.dcrDeletes an entire Custom Reaction or a Specified Response Index Number.dcr "command name" or .dcr "command name" 3
.lcrLists a specified page of Custom Commands.lcr Number i.e .lcr 2
.scrShows all responses to a command. Index Number will be in brackets [ ].scr Hello
.ecrEdit a custom reaction, needs: reaction's name, index to change, and new multiword response..ecr Hello 3 What's up
+

Now that we know the commands let's take a look at the arguments and placeholders available for .acr,

+

.addcustreact (.acr) takes two arguments: +

+
● First, The name of the command; this directly follows the .acr
+
- If your command name is more than 1 word use quotation marks;
i.e .acr Nice weather sure is > .acr "Nice weather" sure is
+
- Now everytime someone says "Nice weather" the bot will respond with, "sure is"
+
● Next, The Response, this follows the name of the command.
+
- i.e .acr "Nice weather"sure is

+

And finally on to the Placeholders

+

There are currently four placeholders, which we will be looking at, with many more to come in the future.

+ + + + + + + + + + + + + + + + + + + + +
PlaceholderHow the placeholder worksExamples
%mention%The %mention% placeholder is triggered when you type @botname.acr "%mention% Hello" Hello! > User input: @botname Hello | Bot Replies: Hello!
%target%The %target% placeholder is used to make Nadeko Mention another person.acr "%mention% Hello" %target% Hi! > User inputs: "@botname Hello @somebody" + Bot replies: "Hi @somebody"
%user%The %user% placeholder mentions the person who said the command.acr "Who am i" You are %user%!
%rng%The %rng% generates a random number.acr Random %rng% +
-`.acr` and `.dcr` require you to be a bot owner. - -`.acr` -Adds a new custom command. **If you add multiple commands with the same name, it will pick random one.** First argument is the name, second one is the response. For example `.acr hello hi`. Now the bot will reply `hi` whenever someone types `hello`. For more than 1 word command, wrap it in `"`. -For example: `.acr "hello there" hi there` - now it will print "hi there" whenever someone types "hello there". Currently you can add this placeholders which will get replaced with appropriate text: -`%mention%` - replaces it with bot mention -`%user%` - replaces it with the user runner's mention -`%target%` - replaces it with a mention of another person from within the original message -`%rng%` replaces it with a random number -for example: `.acr "%mention% hello" Hello %user%` -(we will add much more of these over time) - - -`.dcr "command name" (optional index)` -Deletes either whole custom command and all its responses or a single command's response via an index (if you have multiple responses for the same command). -For example: `.dcr "hi there"` or `.dcr "hi there" 1`. You can get an index by using `.lcr [page number]` - -`.lcr [number]` -Prints a list of custom reactions. Paginated. (for example: `.lcr 1` or `.lcr 4`)