A very simple API/Twitter4J wrapper for Twitter bots.
TwitterBotbot = newTwitterBot(); // create a new Twitter bot instanceBehaviourbehaviour = BehaviourBuilder.create()
.listen(
newKeywordEvent("lookingForThisKeyword"), // looking for "lookingForThisKeyword" and "#mySuperCoolHashtag" on TwitternewHashtagEvent("mySuperCoolHashtag") // can also be achieved by calling listen() on the builder multiple times
).filter(
newRTFilter() // exclude tweets that starts with "RT, a lot of bots do this
).react(
newQueuedReplyReaction("Test!", "Test 123")
).build();
bot.addBehaviour(behaviour); // add the behaviour to the bot instance// or do everything in one statementbot.addBehaviour(
BehaviourBuilder.create().listen(
newMentionEvent("miichidk")
).react(
newLikeReaction()
).build()
);
// ... add as many behaviours as you wantbot.start();To create a new bot/bot behaviour just orientate on the example code. Authentication works via Twitter4j. Follow the instructions here. To authenticate via ConfigurationBuilder, just pass the built configuration object to the constructor of TwitterBot().