From e251e4ec5ab27d3c1445a52bcc07967b871968dd Mon Sep 17 00:00:00 2001 From: Jordan Fearnley Date: Mon, 10 Oct 2016 04:56:51 +0100 Subject: [PATCH 1/3] Update the Custom Reactions Guide for 1.0 Sorry Nekai, I kinda made it less creative ;_; Please rip me to shreds if I made any mistakes --- docs/Custom Reactions.md | 69 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/Custom Reactions.md diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md new file mode 100644 index 00000000..49e365ac --- /dev/null +++ b/docs/Custom Reactions.md @@ -0,0 +1,69 @@ +##Custom Reactions +

Important

+ +###Commands and Their Use + + + + + + + + + + + + + + + + + + + + + +
Command NameDescriptionExample
.acrAdd a custom reaction with a trigger and a response. Running this command in a server requries the Administrator permission. Running this command in DM is Bot Owner only, and adds a new global custom reaction. Guide here: http://nadekobot.readthedocs.io/en/1.0/Custom Reactions/.acr "hello" Hi there, %user%!
.lcrLists a page of global or server custom reactions (15 reactions per page). Running this command in a DM will list the global custom reactions, while running it in a server will list that server's custom reactions..lcr 1
.dcrDeletes a custom reaction based on the provided index. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only, and will delete a global custom reaction..dcr 5
+ +

Now that we know the commands let's take a look at an example of adding a command with .acr,

+

.acr "Nice Weather" It sure is, %user%!

+

This command can be split into two different arguments:

+

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.

+ + + + + + + + + + + + + + + + + + + + + + +
PlaceholderHow the placeholder worksExamples
%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% +
+ + Thanks to Nekai for being creative. <3 From 179407f7947bf5483d79efea966a4403c6c172bc Mon Sep 17 00:00:00 2001 From: Jordan Fearnley Date: Mon, 10 Oct 2016 05:21:11 +0100 Subject: [PATCH 2/3] Delete Custom Reactions.md --- docs/Custom Reactions.md | 69 ---------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 docs/Custom Reactions.md diff --git a/docs/Custom Reactions.md b/docs/Custom Reactions.md deleted file mode 100644 index 49e365ac..00000000 --- a/docs/Custom Reactions.md +++ /dev/null @@ -1,69 +0,0 @@ -##Custom Reactions -

Important

- -###Commands and Their Use - - - - - - - - - - - - - - - - - - - - - -
Command NameDescriptionExample
.acrAdd a custom reaction with a trigger and a response. Running this command in a server requries the Administrator permission. Running this command in DM is Bot Owner only, and adds a new global custom reaction. Guide here: http://nadekobot.readthedocs.io/en/1.0/Custom Reactions/.acr "hello" Hi there, %user%!
.lcrLists a page of global or server custom reactions (15 reactions per page). Running this command in a DM will list the global custom reactions, while running it in a server will list that server's custom reactions..lcr 1
.dcrDeletes a custom reaction based on the provided index. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only, and will delete a global custom reaction..dcr 5
- -

Now that we know the commands let's take a look at an example of adding a command with .acr,

-

.acr "Nice Weather" It sure is, %user%!

-

This command can be split into two different arguments:

-

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.

- - - - - - - - - - - - - - - - - - - - - - -
PlaceholderHow the placeholder worksExamples
%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% -
- - Thanks to Nekai for being creative. <3 From 766c0fd3d3f5bb6228e150577d9a488117de4f8e Mon Sep 17 00:00:00 2001 From: Jordan Fearnley Date: Mon, 10 Oct 2016 05:23:32 +0100 Subject: [PATCH 3/3] Update Custom Reactions.md --- docs/Custom Reactions.md | 124 +++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 62 deletions(-) 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

Important

    -
  • .acr.dcr, and .ecr Require you to be Bot Owner
  • -
  • Adding multiple commands of the same name will make Nadeko randomly select one of the command's responses
  • +
  • For modifying global custom reactions, the ones which will work across all the servers your bot is connected to, you must be a Bot Owner.
    You must also use the commands for adding, deleting and listing these reactions in a direct message with the bot.
  • +
  • For modifying local custom reactions, the ones which will only work on the server that they are added on, require you to have the Administrator permission.
    You must also use the commands for adding, deleting and listing these reactions in the server you want the custom reactions to work on.
###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% -
- - Thanks to Nekai for being creative. <3 + + Command Name + Description + Example + + + .acr + Add a custom reaction with a trigger and a response. Running this command in a server requries the Administrator permission. Running this command in DM is Bot Owner only, and adds a new global custom reaction. Guide here: http://nadekobot.readthedocs.io/en/1.0/Custom Reactions/ + .acr "hello" Hi there, %user%! + + + .lcr + Lists a page of global or server custom reactions (15 reactions per page). Running this command in a DM will list the global custom reactions, while running it in a server will list that server's custom reactions. + .lcr 1 + + + .dcr + Deletes a custom reaction based on the provided index. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only, and will delete a global custom reaction. + .dcr 5 + + +

Now that we know the commands let's take a look at an example of adding a command with .acr,

+

.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.

+

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.

+ + + + + + + + + + + + + + + + + + + + + + +
PlaceholderHow the placeholder worksExamples
%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% +
+ + Thanks to Nekai for being creative. <3