diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md index 4849bf8b..d2e6f40d 100644 --- a/docs/Custom Reactions.md +++ b/docs/Custom Reactions.md @@ -17,22 +17,25 @@ You must also use the commands for adding, deleting and listing these reactions `.acr "Nice Weather" It sure is, %user%!` 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! 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 | -|:-----------:|---------------------------|---------------|-------|--------| -|`%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!| -|`%user%`|The `%user%` placeholder mentions the person who said the command|`.acr "Who am I?" You are %user%!`|Who am I?|You are @Username!| -|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10|`.acr "Random number" %rng%`|Random number|2| +| 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!```|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%!`|Input: "Who am I?" Output: "You are @Username!"| +|`%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