mricanho / Wisdom_Slackbot

Wisdom bot is a bot that works on Slack. I used primarily Ruby and some gems as Puma, Slack-Ruby-Client, etc, to help me to deliver this motivational bot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wisdom_Slackbot

This is my capstone project, a Wisdom Bot that runs on Slack.

Sometimes there are moments when we feel down, not wanting to continue our work, either because it is too much or because it's too complicated, this discourages us, until now.

Wisdom Bot was created to motivate you to finish the day.

The bot can deliver either a video that will help you with an ample spectred of topics or a short but insightful quote that will gradually redefine your mental paths.

screenshot

Built With

  • Ruby v 2.7
  • Rainbow gem
  • TTY font gem
  • Async-Websocket v 0.8.0 gem
  • Slack-Ruby-Bot gem
  • Slack-Ruby-Client gem
  • Puma gem
  • Dotenv gem

Set up

To run this project locally, please ensure you have Ruby installed on your machine, then clone this repository by running.

git clone https://github.com/mricanho/Wisdom_Slackbot

After this, you have to create a slack channel to set up the bot.

  • You can achieve it here.

Once you have your Slack channel to display the bot, you have to register a bot to get the Slack API Token.

screenshot

  • You can achieve it here.

When you completed the step above, you will have the API Token of the new bot.

screenshot

Copy the API Token and go back to your text editor

  • Create a '.env' file and place the API token in there.

screenshot

  • It's super important that you place 'SLACK_API_TOKEN=' before the API Token.

The '.env' file it's connected to the '.gitignore' file that comes with the repository, it will protect your API token, and only you can see it.

  • Now open your terminal, go to the local directory of your repository, and enter 'bundle'.

screenshot

This will install all the gems on your local machine.

The last step is to set up the local server, and it's super easy with the gems we installed before.

  • Open your terminal, go to the local directory of your repository, and enter 'rackup'.

screenshot

That's it, now your bot is connected to Slack, up and running!

As long as your terminal is open and running, the bot will work.

Instructions

Now that the bot is connected to Slack let's see how to interact with it.

Go to the apps in the channel and click on your bot's name.

screenshot

The commands for the bot are:

  • hello
  • help
  • I want a quote
  • I want a video
  • I want an old video
  • I want a new video

That's it, now go and start the communication with the Wisdom bot, begin with a polite 'hello'.

screenshot

Author

👤 Miguel Ricaño

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse
  • The Odin Project

📝 License

This project is GNU licensed.

About

Wisdom bot is a bot that works on Slack. I used primarily Ruby and some gems as Puma, Slack-Ruby-Client, etc, to help me to deliver this motivational bot.

License:GNU Affero General Public License v3.0


Languages

Language:Ruby 100.0%