Skip to content
Chatbot for facebook messenger
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
pom.xml

README.md

Chatbot Release

Facebook messenger group chat bot. Expands upon the MessengerBotAPI system.

Usage

While this class is not instantiable it provides a base class to extend.

class ChatbotTest extends Chatbot {
	public ChatbotTest(Config config) throws SQLException {
		super(config);
	}

	public static void main(String[] args) throws SQLException {
		String configFile = args.length > 0 ? args[0] : null;
		new ChatbotTest(new Config(configFile));
	}

	@Override
	protected void loadModules(Connection connection) throws SQLException {
		modules.put("Google", new OneLinkCommand(this,
				Arrays.asList("google"),
				"Google",
				"https://www.google.com"
		));
	}
}

Making modules

You can make your own custom modules using the CommandModule and DatabaseModule interfaces. CommandModule is called every time a new message arrives and its method process(Message message) is called. If the program required Database access then it must implement the DatabaseModule and its method prepareStatements(Connection connection).

You can’t perform that action at this time.