README.md in slack-smart-bot-1.4.3 vs README.md in slack-smart-bot-1.5.0

- old
+ new

@@ -104,10 +104,11 @@ # help: `echo SOMETHING` # help: repeats SOMETHING # help: when /^echo\s(.+)/i respond $1 + react :monkey_face # help: `go to sleep` # help: it will sleep the bot for 10 seconds # help: when /^go\sto\ssleep/i @@ -117,11 +118,13 @@ case @questions[from] when /yes/i, /yep/i, /sure/i @questions.delete(from) respond "I'll be sleeping for 10 secs... just for you" respond "zZzzzzzZZZZZZzzzzzzz!" + react :sleeping sleep 10 + react :sunny when /no/i, /nope/i, /cancel/i @questions.delete(from) respond "Thanks, I'm happy to be awake" else respond "I don't understand" @@ -132,11 +135,11 @@ # help: ---------------------------------------------- # help: `run something` # help: It will run the process and report the results when done # help: when /^run something/i - respond "Running" + react :runner process_to_run = "ruby -v" stdout, stderr, status = Open3.capture3(process_to_run) if stderr == "" if stdout == "" @@ -169,10 +172,13 @@ To run a command on demand: **_`!THE_COMMAND`_** **_`@NAME_OF_BOT THE_COMMAND`_** **_`NAME_OF_BOT THE_COMMAND`_** +To run a command on demand and add the respond on a thread: + **_`^THE_COMMAND`_** + **_`!!THE_COMMAND`_** Examples run a command on demand: >**_Peter>_** `!ruby puts Time.now` >**_Smart-Bot>_** `2019-10-23 12:43:42 +0000` @@ -180,16 +186,22 @@ >**_Smart-Bot>_** `Example` >**_Peter>_** `smart-bot see shortcuts` >**_Smart-Bot>_** `Available shortcuts for Peter:` >`Spanish account: ruby require 'iso/iban'; 10.times {puts ISO::IBAN.random('ES')}` +>**_Peter>_** `!!echo Example` +> **_Smart-Bot>_** `Example` +>**_Peter>_** `^echo Example` +> **_Smart-Bot>_** `Example` Also you can always call the Smart Bot from any channel, even from channels without a running Smart Bot. You can use the External Call on Demand: **_`@NAME_OF_BOT on #CHANNEL_NAME COMMAND`_**. In this case you will call the bot on #CHANNEL_NAME. Example: >**_Peter>_** `@smart-bot on #the_channel ruby puts Time.now` >**_Smart-Bot>_** `2019-10-23 12:43:42 +0000` +>**_Peter>_** `@smart-bot on #the_channel ^ruby puts Time.now` + >**_Smart-Bot>_** `2019-10-23 12:43:42 +0000` ### Bot Help To get a full list of all commands and rules for a specific Smart Bot: **_`bot help`_**. It will show only the specific available commands for the user requesting. @@ -229,9 +241,13 @@ If you want to pause a bot, from the channel of the bot: **_`pause bot`_**. To start it again: **_`start bot`_** To see the status of the bots, on the MASTER CHANNEL: **_`bot status`_** To close the Master Bot, run on MASTER CHANNEL: **_`exit bot`_** + +If you are a Master Admin on a Direct Message with the Smart Bot you can call the **_`bot stats`_** and get use stats of the users. You need to set to <true> the `stats` settings when initializing the Smart Bot. Take a look at `bot help bot stats` for more info. + +You can also get the bot logs of the bot channel you are using by calling `get bot logs`. You need to be a Master Admin user on a DM with the Smart Bot. #### Cloud Bots If you want to create a bot that will be running on a different machine: **_`create cloud bot on CHANNEL`_**. Even though the cloud bots are running on different machines, the management can be done through the MASTER CHANNEL. The new cloud bot will be managed by your Master Bot like the others, closing, pausing... Cloud Bots are typically used to run commands on specific environments or even different OS or networks.