Custom reactions guide doc "fixing"
Entire document is in markdown now and looks good when built with readthedocs. Did a little "housekeeping" for clarification as well.
This commit is contained in:
parent
9561c06ad5
commit
8f96d4cfe0
@ -17,22 +17,25 @@ You must also use the commands for adding, deleting and listing these reactions
|
|||||||
`.acr "Nice Weather" It sure is, %user%!`
|
`.acr "Nice Weather" It sure is, %user%!`
|
||||||
|
|
||||||
This command can be split into two different arguments:
|
This command can be split into two different arguments:
|
||||||
* The trigger `"Nice Weather"`
|
|
||||||
* And the response, `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.
|
* The trigger, `"Nice Weather"`
|
||||||
|
* And the response, `It sure is, %user%!`
|
||||||
|
|
||||||
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
|
An important thing to note about the triger is that, 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.
|
||||||
|
|
||||||
|
Now, if that command was ran in a server, anyone on that server can make the bot mention them, saying `It sure is, @Username` anytime they say "Nice Weather". If the command is ran in a direct message with the bot, then the custom reaction can be used on every server the bot is connected to.
|
||||||
|
|
||||||
###Placeholders!
|
###Placeholders!
|
||||||
There are currently three different placeholders which we will look at, with more placeholders potentially coming in the future.
|
There are currently three different placeholders which we will look at, with more placeholders potentially coming in the future.
|
||||||
|
|
||||||
| Placeholder | How the placeholder works | Example Usage | Input | Output |
|
| Placeholder | Description | Example Usage | Usage |
|
||||||
|:-----------:|---------------------------|---------------|-------|--------|
|
|:-----------:|-------------|---------------|-------|
|
||||||
|`%mention`|The `%mention%` placeholder is triggered when you type `@BotName` - It's important to note that if you've given the bot a custom nickname, this trigger won't work!|`.acr "Hello %mention%" I, %mention%, also say hello!`|Hello @BotName|I, @BotName, also say hello!|
|
|`%mention`|The `%mention%` placeholder is triggered when you type `@BotName` - It's important to note that if you've given the bot a custom nickname, this trigger won't work!|```.acr "Hello %mention%" I, %mention%, also say hello!```|Input: "Hello @BotName" Output: "I, @BotName, also say hello!"|
|
||||||
|`%user%`|The `%user%` placeholder mentions the person who said the command|`.acr "Who am I?" You are %user%!`|Who am I?|You are @Username!|
|
|`%user%`|The `%user%` placeholder mentions the person who said the command|`.acr "Who am I?" You are %user%!`|Input: "Who am I?" Output: "You are @Username!"|
|
||||||
|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10|`.acr "Random number" %rng%`|Random number|2|
|
|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10|`.acr "Random number" %rng%`|Input: "Random number" Output: "2"|
|
||||||
|
|
||||||
[//]: # (|`%target%`|The `%target%` placeholder is used to make Nadeko Mention another person or phrase|`.acr "Say this: " %target%|Say this: I, @BotName, am a parrot!|I, @BotName, am a parrot!|)
|
[//]: # (|`%target%`|The `%target%` placeholder is used to make Nadeko Mention another person or phrase|`.acr "Say this: " %target%|Input: "Say this: I, @BotName, am a parrot!". Output: "I, @BotName, am a parrot!".|)
|
||||||
|
|
||||||
Thanks to Nekai for being creative. <3
|
Thanks to Nekai for being creative. <3
|
||||||
|
Loading…
Reference in New Issue
Block a user