Skip to content

A simple news bot for Slack fed through CNN International news website.

License

Notifications You must be signed in to change notification settings

dansantander/ruby-slackbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RUBY SLACK BOT

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


NEWSBOT


Explore the docs »

· Report Bug · Request Feature

Table of Contents

Getting Started

Prerequisites

You should have installed:

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.).

Install

  • 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 the bundle 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 named Gemfile.lock inside your project directory.

Usage

  • 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:

invite

(Your bot will appear with the name and the icon you set before) And off you go! Hope you enjoy it. :)

Commands

help

help

get_news

get_news

get_news (topic)

get_news topic

About The Project

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).

Built With

  • Ruby
  • Slack-Ruby-Bot
  • celluloid-io
  • dotenv
  • puma

Acknowledgments

This project was possible thanks to the Slack Ruby Bot team.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Daniel Santander - Github profile
Project Link: https://github.com/dansantander/ruby-slackbot

About

A simple news bot for Slack fed through CNN International news website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages