/Slack-Music-Buddy

Your friendly neighbor, who knows a little bit too much about music

Primary LanguageRuby

Your friendly neighbor, who knows a little bit too much about music

Run on Repl.it

Navigation


Test it yourself

You can join the Example Inc. slack server to test the bot yourself without downloading anything!!!

(Keep in mind the bot is hosted on a free Heroku account, so it sleeps 6 hours a day, from 12 am to 6 am timezone -6)


Test it locally

  • First: Clone the GitHub repo to your machine
$ git clone git@github.com:YoseptF/Slack-Music-Buddy.git
  • Install the dependencies: This project uses some gems, you can check what they are in Gemfile, to install them type:
$ bundle install

Important! before running it

Remember adding your own .env before running the bot locally, if you are hosting it on Heroku, change the env variables on the site too

this is an example of how your .env should look like (or if you're reviewing the project you can contact me on slack to save some time ;3):

SLACK_API_TOKEN=YOUR_API
YOUTUBE_API=YOUR_API
SPOTIFY_API=YOUR_API

If you need your own API keys, you can get them here:

  • Then: Open a terminal inside your folder and run
$ rake deploy:run

You should receive a message like this one: rake gif

  • Finally: Invite the bot to the channel you want it to be in

invite image

AND THAT'S IT, you can go to the channel now and interact with the bot :D you can start with:

@Music Buddy help

run command

rake deploy:run or heroku run rake deploy:run

Commands on slack


Youtube

youtube + search

youtube command


Spotify

spotify + search

youtube command


help

@Music Buddy help

youtube command


Notes

remember to run dotenv rspec intead of only rspec when testing, since Rspec and the inner commands require ENV variables to work