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.
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.
- You can achieve it here.
When you completed the step above, you will have the API Token of the new bot.
Copy the API Token and go back to your text editor
- Create a '.env' file and place the API token in there.
- 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'.
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'.
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.
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'.
Author
👤 Miguel Ricaño
- Github: @mricanho
- Linkedin: Miguel Ricaño
Show your support
Give a ⭐️ if you like this project!
Acknowledgments
- Microverse
- The Odin Project
📝 License
This project is GNU licensed.