wheaties-brain-java combines PircBotX and JMegaHal into a simple conversational IRC bot.
The bot will respond when someone mentions its nick, and "learns" from all others. It attempts to identify "interesting" words in order to generate a relevant response, skipping common English words like articles and prepositions.
wheaties-brain-java ignores messages that begin with any of the characters in IGNORE_PREFIXES (useful if you have other IRC bots whose interface involves a command prefix). It also ignores messages in the form "nick: x is y" to avoid conflicts with the Wheaties programmable chat bot.
If you're running Matterbridge, you might have an IRC bot in your channel that sends messages of the form "[source] <nick> message" or "<nick> message". wheaties-brain-java recognizes those, and only learns from the chat message itself.
The easiest way to run wheaties-brain-java is using the wheaties-brain-java Docker image:
docker run -e IRC_NICK=Wheaties -e IRC_SERVER=irc.example.com wheaties-brain-java:latest
wheaties-brain-java can be configured using the following environment variables.
| Name | Required? | Description |
|---|---|---|
IGNORE_PREFIXES | Optional | Ignore messages starting with any character in this environment variable's value. |
IRC_CHANNELS | Required | Comma-separated list of IRC channels to join. |
IRC_NICK | Required | IRC nickname. |
IRC_PASS | Optional | IRC server password. |
IRC_PORT | Required | IRC server port. |
IRC_REALNAME | Required | IRC real name. |
IRC_SERVER | Required | IRC server address. |
IRC_TLS | Optional | Set to true to connect using TLS. |
IRC_USER | Required | IRC server username. |
MATTERBRIDGE_USER | Optional | Matterbridge bot username. If this environment variable is set, wheaties-brain-java will strip any [source] <nick> prefix from the message before "learning" it. |
To build the project, run ./gradlew build. To build a standalone "fat" JAR that includes all dependencies, use ./gradlew shadowJar. To build a Docker image tagged with the project's current version, run ./gradlew docker.
In order to be compatible with PircBotX, wheaties-brain-java is licensed under the GNU General Public License v3.
Content type
Image
Digest
Size
234.8 MB
Last updated
over 4 years ago
docker pull blolol/wheaties-brain-java