diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md index fc2dd0b5..49e365ac 100644 --- a/docs/Custom Reactions.md +++ b/docs/Custom Reactions.md @@ -1,69 +1,69 @@ ##Custom Reactions -
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
.acr
, .dcr
, and .ecr
Require you to be Bot OwnerCommand Name | -Description | -Example | -
---|---|---|
.acr |
-Adds a Custom Reaction | -.acr Hello Hi! |
-
.dcr |
-Deletes an entire Custom Reaction or a Specified Response Index Number | -.dcr "command name" or .dcr "command name" 3 |
-
.lcr |
-Lists a specified page of Custom Commands | -.lcr Number i.e .lcr 2 |
-
.scr |
-Shows all responses to a command. Index Number will be in brackets [ ] |
-.scr Hello |
-
.ecr |
-Edit a custom reaction, needs: reaction's name, index to change, and new multiword response. | -.ecr Hello 3 What's up |
.acr
,.addcustreact
(.acr
) takes two arguments:
-
.acr
.acr Nice weather sure is
.acr "Nice weather" sure is
.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.
-
Placeholder | -How the placeholder works | -Examples | -
---|---|---|
%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
.acr "hello" Hi there, %user%!
.lcr
.lcr 1
.dcr
.dcr 5
.acr
,.acr "Nice Weather" It sure is, %user%!
This command can be split into two different arguments:
"Nice Weather"
It sure is, %user%!
Because we wanted the trigger to be more than one word, we had to wrap it with quotation marks, "Like this"
otherwise, only the first word would have been recognised as the trigger, and the second word would have been recognised as part of the response.
There's no special requirement for the formatting of the response, so we could just write it in exactly the same way we want it to respond, albeit with a placeholder - which will be explained in this next section
+ +###Placeholders! +There are currently three different placeholders which we will look at, with more placeholders potentially coming in the future.
+ +Placeholder | +How the placeholder works | +Examples | +
---|---|---|
%mention% |
+ The %mention% placeholder is triggered when you type @botname - It's important to note that if you've given the bot a nickname, this trigger won't work! |
+ .acr "%mention% Hello" Hello! > User input: @botname Hello | Bot Replies: Hello! |
+
%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 between 0 and 10 |
+ .acr Random %rng%
+ |