Update Custom Reactions.md
This commit is contained in:
parent
8d7536ca24
commit
3f0a6c5237
@ -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)**
|
||||
<h1>Custom Reactions<img src="http://i.imgur.com/1T2L3xR.png" style="width:15%; height:auto;"> <span style="width:100%"><a href="https://nadekobot.xyz/">
|
||||
<img src="http://i.imgur.com/VtL9Omo.png" width="0" height="0" border="0">![Imgur](http://i.imgur.com/VtL9Omo.png "@Nekai :P takes you to the nadekobot website")</h1></a></span>
|
||||
###<p><strong>Every time you add or remove a custom reaction you will need to restart your bot with either <code>.restart</code> if you are hosting or Nadeko is on VPS, or <code>.die</code> if Nadeko is on Droplet</strong></p>
|
||||
<h3>Important</h3>
|
||||
<ul style="list-style-type:disc">
|
||||
<li><strong><code>.acr</code>, <code>.dcr</code>, and <code>.ecr</code> Require you to be Bot Owner</strong></li>
|
||||
<li>Adding multiple commands of the same name will make Nadeko randomly select one of the command's responses</li>
|
||||
</ul>
|
||||
<h2>Commands and Their Use</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Command Name</th>
|
||||
<th>Description</th>
|
||||
<th>Example</th>
|
||||
</tr><tr>
|
||||
<td align="center"><code>.acr</code></td>
|
||||
<td>Adds a Custom Reaction</td>
|
||||
<td><code>.acr Hello Hi!</code></td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>.dcr</code></td>
|
||||
<td>Deletes an entire Custom Reaction or a Specified Response Index Number</td>
|
||||
<td><code>.dcr "command name"</code> or <code>.dcr "command name" 3</code></td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>.lcr</code></td>
|
||||
<td>Lists a specified page of Custom Commands</td>
|
||||
<td><code>.lcr Number</code> i.e <code>.lcr 2</code></td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>.scr</code></td>
|
||||
<td>Shows all responses to a command. Index Number will be in brackets <code>[ ]</code></td>
|
||||
<td><code>.scr Hello</code></td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>.ecr</code></td>
|
||||
<td>Edit a custom reaction, needs: reaction's name, index to change, and new multiword response.</td>
|
||||
<td><code>.ecr Hello 3 What's up</code></td></table>
|
||||
<h3>Now that we know the commands let's take a look at the arguments and placeholders available for <code>.acr</code>,</h3>
|
||||
<p><code>.addcustreact</code> (<code>.acr</code>) takes two arguments:
|
||||
<dl>
|
||||
<dt><strong>● First, The name of the command; this directly follows the <code>.acr</code></strong></dt>
|
||||
<dd>- If your command name is more than 1 word use quotation marks;<br> i.e <del><code>.acr Nice weather sure is</code></del> > <code>.acr "Nice weather" sure is</code></dd>
|
||||
<dd>- Now everytime someone says "Nice weather" the bot will respond with, "sure is"</dd>
|
||||
<dt><strong>● Next, The Response, this follows the name of the command.</strong><dt>
|
||||
<dd>- i.e <code>.acr "Nice weather"</code><b><i><code>sure is</code></i></b></dd></dl><p>
|
||||
<h3>And finally on to the Placeholders</h3>
|
||||
<p>There are currently four placeholders, which we will be looking at, with many more to come in the future.<p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Placeholder</th>
|
||||
<th>How the placeholder works</th>
|
||||
<th>Examples</th>
|
||||
</tr><tr>
|
||||
<td align="center"><code>%mention%</code></td>
|
||||
<td>The <code>%mention%</code> placeholder is triggered when you type <code>@botname</code></td>
|
||||
<td><code>.acr "%mention% Hello" Hello!</code> > User input: @botname Hello | Bot Replies: Hello!</td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>%target%</code></td>
|
||||
<td>The <code>%target%</code> placeholder is used to make Nadeko Mention another person</td>
|
||||
<td><code>.acr "%mention% Hello" %target% Hi!</code> > User inputs: "@botname Hello @somebody"
|
||||
Bot replies: "Hi @somebody"</td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>%user%</code></td>
|
||||
<td>The <code>%user%</code> placeholder mentions the person who said the command</td>
|
||||
<td><code>.acr "Who am i" You are %user%!</code></td>
|
||||
</tr><tr>
|
||||
<td align="center"><code>%rng%</code></td>
|
||||
<td>The <code>%rng%</code> generates a random number</td>
|
||||
<td><code>.acr Random %rng%</code>
|
||||
</tr></table>
|
||||
|
||||
`.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`)
|
||||
|
Loading…
Reference in New Issue
Block a user