nerd-bot is a bot built with the goal to automate jokes and humor mainly popular within the developers community. Most times we developers/programmers get tired writing code and since https://www.slack.com is where most of our interaction occurs, it's not uncommon to just chat with a bot cracking jokes as your teammates might still be busy, nice right? Nerd-bot scraps the web and returns you random jokes in form of images or text given the right commands in slack.
- You will need to create a new slackwork space
- Head over to http://slack.com/services/new/bot
- Give your bot a name
- Configure it as you desire and save integration
- Save the SLACK_API_TOKEN string that starts with
xoxb, you will need it later - Head over to slack and you will see your bot
- Clone this project locally
- Run
git checkout feat/slack-botin the terminal - Run
bundleto installGemsand their dependencies. - Create a
.envfile and paste your earlier saved SLACK_API_KEY - Check the
.env.examplefile on how to do it - Run
bundle exec rackupto start it the server - Your bot should be working by now
- Test have been built using
Rspecas Test Runner and Fixture - Test Coverage by
SimpleCov - Run
rspecto run the test - On windows run
open coverage/index.htmlfor code coverage - On unix based systems run
xdg-open coverage/index.htmlfor code coverage
- The bot can be invited into other workspace or direct messaged
- Use
@bot_username jokes_imageto get programming jokes as images where@bot_usernameis the name of your bot - Use
@bot_username jokes_textto get programming jokes as texts - Use
@bot_username say_helloto greet the bot - The
@bot_usernameis optional while talking in a Direct message with the bot - Type
@bot_usernamehelpfor the above commands - Enjoy
👤 Emmanuel Okello
- GitHub: @oxenprogrammer
- Twitter: @ox_emmy
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Give a ⭐️ if you like this project!
This project is MIT licensed.
