#JKik JKik is a simple Java kik api for creating bots.
To get an auth key visit https://dev.kik.com/#/home
- ChatEvent
- CommandEvent
#Creating an instance of the api
KikAPI api = new KikAPI("username", "auth-key");
api.start("http://your-address", 8686, "/webhook");
This evenbus is thread-safe & reflectionless
api.getEventBus().register(ChatEvent.class, event ->
{
event.getChat().sendMessage("Hello " + event.getChat().getSender());
});
#Creating suggestions
Suggestions will replace the keyboard with buttons, then you click these buttons, it will send the defined text.
Suggestion suggestions = new Suggestion("How are you?");
suggestions.addButton("Good :)");
suggestions.addButton("Not so good :(");
getChat().sendSuggestion(suggestions);
public class TestCommand extends Command
{
public TestCommand()
{
super("test");
}
@Override
public void execute()
{
getChat().sendMessage("Hello world!");
}
}
public class Main
{
public static void main(String[] args) throws Exception
{
KikAPI api = new KikAPI("username", "auth-key");
api.start("http://your-address", 8686, "/webhook");
api.getCommandBus().register(new TestCommand());
}
}