Browse Source

Updated README.md

Changed description to be more clear under "Admin Commands:"
Added description and images for adding API commands.
master
Tearzz 6 years ago
committed by GitHub
parent
commit
159ad6254c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      README.md

+ 10
- 2
README.md View File

@ -21,15 +21,23 @@ But as you can see in the preview image it's also able to handle custom commands
**Adding Commands:** **Adding Commands:**
1. Open **"CommandsHandler.rb"** and scroll down to the `commands` array and add your own. 1. Open **"CommandsHandler.rb"** and scroll down to the `commands` array and add your own.
2. Go to folder **"Responses"** and add the command as a text file in all lowercase. _Examples have been included_ 2. Go to folder **"Responses"** and add the command as a text file in all lowercase. _Examples have been included_
**Admin Commands:**
If you are adding admin commands add a custom response next to it. There you'll be able to add commands that gives data to the socket instead of a chat message as a response. Example: If you are adding admin commands add a custom response next to it. There you'll be able to add commands that gives data to the socket instead of a chat message as a response. Example:
`admin_commands = { `admin_commands = {
"disconnect" => "PART ##{CHANNEL}" "disconnect" => "PART ##{CHANNEL}"
}` }`
When the command `"!disconnect"` has been typed in chat by the channel owner it will send a request to disconnect from the current Twitch channel._
When the command `"!disconnect"` has been typed in chat by the channel owner _(or anyone specified in the `admins` array)_ it will send a request to disconnect from the current Twitch channel._
![alt text](https://i.imgur.com/iYtSvaG.png "Prefix, commands and admin commands") ![alt text](https://i.imgur.com/iYtSvaG.png "Prefix, commands and admin commands")
**API Commands:**
If you want to add API commands you just scroll down to `# ----- API COMMANDS ----- #` _(First section after receiving messages)_ and add your commands. In the example it calls some functions which are made at the bottom of the script.
![alt text](https://i.imgur.com/CBF7vYf.png "Right after the received messages section")
Then you scroll down to the bottom under `# ----- API COMMANDS ----- #` and add a function to that command.
![alt text](https://i.imgur.com/CBF7vYf.png "Here you add your dedicated function for the API command")
---- ----

Loading…
Cancel
Save