Awesome
JBot
Make bots in Java.
JBot is a java framework (inspired by Howdyai's Botkit) to make Slack and Facebook bots in minutes. It provides all the boilerplate code needed so that you can make your bot live right away.
Why use JBot?
- Provides you with all the boilerplate code which handles underlying websocket connections and other complexities.
- Supports extra events in addition to all the events supported by Slack/Facebook which makes your work a lot more easier.
- Receiving & sending messages is as easy as defining a
@Controller
and callingreply()
. - Conversation feature of JBot makes talking to your bot a breeze. This feature makes JBot different than rest of the Java frameworks out there.
- Well tested with good coverage unit tests.
- And many other features which can't just be mentioned here.
Not satisfied? Read on...
- JBot got more than 400 stars in just 2 days after release.
- It is in the Hacker News 50 club.
- Chosen by DZone daily picks.
- Last but not the least, it's listed on Slack.com
Still worried? Open an issue on Github and we can discuss.
JBot for Slack
Running your SlackBot is just 4 easy steps:
- Clone this project
$ git clone https://github.com/rampatra/jbot.git
. - Create a slack bot and get your slack token.
- Paste the token in application.properties file.
- Run the example application by running
JBotApplication
in your IDE or via commandline:$ cd jbot $ mvn clean install $ cd jbot-example $ mvn spring-boot:run
You can now start talking with your bot ;)
Read the detailed Slack documentation to learn more.
JBot for Facebook
Similar to Slack, Facebook is simple too but has a few extra steps:
- Clone this project
$ git clone git@github.com:rampatra/jbot.git
. - Create a facebook app and a page.
- Generate a Page Access Token for the page (inside app's messenger settings).
- Paste the token created above in application.properties file.
- Run the example application by running
JBotApplication
in your IDE or via commandline:$ cd jbot $ mvn clean install $ cd jbot-example $ mvn spring-boot:run
- Setup webhook to receive messages and other events. You need to have a public address to setup webhook. You may use localtunnel.me to generate a public address if you're running locally on your machine.
- Specify the address created above in "Callback Url" field under "Webooks" setting and give the verify token
as
fb_token_for_jbot
and click "Verify and Save".
You can now start messaging your bot by going to the facebook page and clicking on the "Send message" button.
If you're too lazy to start now and just want to play around, you can try -- The server is currently downjbot-example
by visiting
JBot facebook page and clicking on the "Send Message" button.
Read the detailed Facebook documentation to learn more.
Contributors
This project exists thanks to all the awesome people who contribute. If you want to flaunt your skills and make the project better, you can start contributing, and for any queries please just raise an issue and I would be more than happy to discuss :)
<a href="graphs/contributors"><img src="https://opencollective.com/jbot/contributors.svg?width=890" /></a>
Backers
Thank you to all our backers! 🙏 [Become a backer]
<a href="https://opencollective.com/jbot#backers" target="_blank"><img src="https://opencollective.com/jbot/backers.svg?width=890"></a>
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
<table border="0"> <tr> <td> <a href="https://presentifyapp.com/" target="_blank"><img src="https://presentifyapp.com/assets/img/presentify/app-icon-512.png" width="150" height="150"></a> </td> <td> <a href="https://todobarapp.com/" target="_blank"><img src="https://todobarapp.com/assets/img/todobar/app-icon-512.png" width="150" height="150"></a> </td> <td> <a href="https://www.jetbrains.com?from=JBot" target="_blank"><img src="https://svgshare.com/i/6AL.svg"></a> </td> <td> <a href="https://www.yourkit.com?from=JBot" target="_blank"><img src="https://www.yourkit.com/images/yklogo.png"></a> </td> </tr> </table><a href="https://opencollective.com/jbot#sponsors" target="_blank"><img src="https://opencollective.com/jbot/sponsors.svg?width=890"></a>
<!-- <a href="https://opencollective.com/jbot/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jbot/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/jbot/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jbot/sponsor/1/avatar.svg"></a> -->P.S. For any queries or concerns, you can reach out to me on Twitter. I'll try my best to help 🙏.