The purpose of this project was to build a bot with Ruby. I chose to build a Slack Bot because it's the platform I use the most for communicating with my coding mates. Also, I built this bot thinking about what could be useful for every team in Slack without necessarily getting into the tech or programming field, so that's the reason why I made a newsbot. When called, it delivers a link to a piece of news from the CNN International website.
Project: Ruby Capstone Project - Ruby Slack Bot
Explore the docs »
·
Report Bug
·
Request Feature
You should have installed:
- Ruby
- Bundler
You will need to:
- Create a Slack workspace here. Note: If you want the bot to be running inside an already existing workspace, you'll need administrator permissions.
- Have a Slack API Token. You can get one by creating an app here. Your Slack API Token is the one that starts with
xoxb-
. Remember to save it somewhere safe. You'll use it later. - Personalize your bot (name, icon, etc.).
- Download or clone this project into your local machine.
- As this repository already has a Gemfile ready, you should install all the dependencies by running
bundle
in your terminal inside your project directory. You can also use thebundle install
command for this purpose. See more about it here. If everything went well with the installation for this step, you should now have a file namedGemfile.lock
inside your project directory.
- To start using the bot you'll need to create a file named
.env
in the root folder of the project and paste in your Slack API Token as follows:SLACK_API_TOKEN=<your token>
- Once you have everything set, you can start the bot by running
rackup
from your terminal inside the main directory. - After the bot is running, open Slack and add the workspace you created. You can invite the bot to a Slack channel like this:
(Your bot will appear with the name and the icon you set before) And off you go! Hope you enjoy it. :)
This project was built following the next Microverse requirements:
- A bot developed in Ruby.
- Recommended platforms: Slack, Twitter, Telegram.
- You choose the platform and the functionality of the bot.
- The README must include instructions on how to use the bot (how to install it and use it).
- Ruby
- Slack-Ruby-Bot
- celluloid-io
- dotenv
- puma
This project was possible thanks to the Slack Ruby Bot team.
Distributed under the MIT License. See LICENSE
for more information.
Daniel Santander - Github profile
Project Link: https://github.com/dansantander/ruby-slackbot