botan-core

tiny chat bot framework for Java SE 8.(like a Hubot)

License

License

GroupId

GroupId

com.github.masahitojp
ArtifactId

ArtifactId

botan-core
Last Version

Last Version

0.6.4
Release Date

Release Date

Type

Type

jar
Description

Description

botan-core
tiny chat bot framework for Java SE 8.(like a Hubot)
Project URL

Project URL

https://github.com/masahitojp/botan-core
Source Code Management

Source Code Management

https://github.com/masahitojp/botan-core.git

Download botan-core

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.masahitojp/botan-core/ -->
<dependency>
    <groupId>com.github.masahitojp</groupId>
    <artifactId>botan-core</artifactId>
    <version>0.6.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.masahitojp/botan-core/
implementation 'com.github.masahitojp:botan-core:0.6.4'
// https://jarcasting.com/artifacts/com.github.masahitojp/botan-core/
implementation ("com.github.masahitojp:botan-core:0.6.4")
'com.github.masahitojp:botan-core:jar:0.6.4'
<dependency org="com.github.masahitojp" name="botan-core" rev="0.6.4">
  <artifact name="botan-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.masahitojp', module='botan-core', version='0.6.4')
)
libraryDependencies += "com.github.masahitojp" % "botan-core" % "0.6.4"
[com.github.masahitojp/botan-core "0.6.4"]

Dependencies

compile (5)

Group / Artifact Type Version
com.ullink.slack : simpleslackapi jar 1.0.0
org.reflections : reflections jar 0.9.10
io.netty : netty-codec-http jar 4.1.14.Final
tv.cntt : netty-router jar 2.0.0
org.slf4j : slf4j-api jar 1.7.25

test (4)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
junit : junit jar 4.12
org.hamcrest : java-hamcrest jar 2.0.0.0
org.jmockit : jmockit jar 1.29

Project Modules

There are no modules declared in this project.

botan(牡丹)

Join the chat at https://gitter.im/masahitojp/botan-core

Circle CI

Maven Central

Known Vulnerabilities

botan Tiny chat bot framework for Java SE 8.(like a Hubot)

requirement

Java8

Getting Started

Write simple java application

package com.github.masahitojp.implementation;

import com.github.masahitojp.botan.Botan;
import com.github.masahitojp.botan.exception.BotanException;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class SlackBot {

    static public void main(final String[] Args) {

        final Botan botan = new Botan.BotanBuilder()
                .build();
        try {
            botan.start();
        } catch (final BotanException ex) {
            log.warn(ex.getMessage());
        }

    }
}
package com.github.masahitojp.implementation.handlers;

import com.github.masahitojp.botan.Robot;
import com.github.masahitojp.botan.handler.BotanMessageHandlers;

@SuppressWarnings("unused")
public class PingMessageHandlers implements BotanMessageHandlers {

    @Override
    public void register(final Robot robot) {
        robot.respond(
                "ping\z",
                "ping method",
                message -> message.reply("pong")
        );
    }
}

if you want to more examples, see sample project.

Add dependency to your build.gradle

apply plugin: 'java'

repositories.mavenCentral()

dependencies {
	compile 'com.github.masahitojp:botan-core:0.6.+'
}

sourceCompatibility = targetCompatibility = 1.8

Run and View

show your slack team

Features

Currently, supports following adapters and brains:

License

Apache License, Version 2.0

Special Thanks

  • @_pochi -san wrote a nice logo. Thanks!!

Inspired projects

How to write Handlers

  • create class which implements BotanMessageHandlers.
  • Override register method
    • Robot#respond
package com.github.masahitojp.implementation.handlers;

import com.github.masahitojp.botan.Robot;
import com.github.masahitojp.botan.handler.BotanMessageHandlers;

@SuppressWarnings("unused")
public class PingMessageHandlers implements BotanMessageHandlers {

    @Override
    public void register(final Robot robot) {
        robot.respond(
                "ping\z",
                "ping method",
                message -> message.reply("pong")
        );
    }
}

Versions

Version
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0.0
0.5.0.0
0.3.2.0
0.3.1.0
0.3.0.0
0.2.0.0
0.1.1.1
0.1.1.0
0.1.0.0
0.0.2.0
0.0.1.4
0.0.1.3
0.0.1.2
0.0.1.1
0.0.1.0
0.0.0.25