Home

evanchooly edited this page Oct 11, 2012 · 5 revisions
Clone this wiki locally

Javabot FAQ

How do I use the javabot?

  • Ask it how in a private message: /msg javabot help
  • A quick primer is included in this FAQ, but it is not meant to be a complete tutorial. You should observe how the channel regulars use javabot, and learn from that.
  • All commands are assumed to be executed from the channel. If done in private message, the tilde is unnecessary and invalid.

Where can I find javabot’s web interface?

What is karma?

Karma is a rough measure of your peers’ respect toward you in matters related to the ##java channel. It’s common for residents to assign you karma points for:


  • helping with a tough problem without spoonfeeding
  • saying something funny
  • providing a service to the ##java community
  • otherwise being someone that others respect, like, etc. in ##java

How do i increment or decrement somebody’s karma?

  • To increment somebody’s karma do ~nick++
  • To decrement somebody’s karma to do ~nick—
  • You cannot modify karma in a private message.

Note: Incrementing your own karma will cause you to lose one karma point. This is not a bug, so don’t bother reporting it. It is intended to discourage karma whoring. Karma whoring is defined as trying to increment your own karma to make you look like you have more respect than you actually do.

How do I add factoids?


To add a factoid the syntax is: ~foo is bar, this would would add the factoid foo with the value bar. Replace foo with the name of the factoid you want to add.

There are special tags that can be used.

  • <reply> makes the factoid trigger a reply from javabot, the reply is whatever is after the <reply> tag.
  • <action> makes the bot do an action.

The syntax is: ~foo is <reply>bar and ~foo is <action>jumps up and down, replace foo with the name of the factoid you’d like to add.

You can also have a factoid take an argument, the syntax is ~greet $1 is <reply>Hello $1. You’d trigger that factoid by typing ~greet bob, where bob is the value you need passed to the bot. That will output Hello bob.

Another token is $^ which camel-cases the input (and also removes all spaces), that is ~foo $^ is <reply>$^. The reply will be the input passed to ~foo camel-cased with all spaces removed. So, for example:
~foo This is a test will output: ThisIsATest

There is also $+ . This token will URL encode the input so it can cleanly be passed as a GET parameter to a url such as google, etc. Usage is similar to the $^ and $1 tokens. For more information see the javadoc for URLEncoder.encode(String). For example: ~foo $+ is <reply>http://www.google.com/search?q=$+

One other token is $who. That is the person who retrieved the factoid. or the person for whom the ~tell was intended.

How do I redirect a factoid to an existing one?

To do that you use the <see> tag. Please keep in mind that you should not put a space between <see> and the factoid you are redirecting to. For example: foo is <see>bar

How do I get information about who added a factoid?

Do ~info rbi replacing rbi with the name of the factoid you’d like to know about.

How do I use the javadoc command in javabot?

  • To get the javadoc page for a specific class, just do ~javadoc String.
  • To get the method inside a class of a javadoc page do ~javadoc String.split(*), you can replace the asterisk with the type parameter, such as ~javadoc String.split(String), String.split() takes a String as a parameter.
  • There may be cases where the same class name exists in different packages. Such is true for List. There is java.util.List and java.awt.List. You may need to actually specify which you want so do, ~javadoc java.util.List, this is most likely the one you will want, otherwise when you do ~javadoc List, both will come up.

How do I tell another user about one of the factoids or a javadoc

There are two ways:


  • ~tell user about rbi (replace rbi with the name of the factoid you’d like to give them)
  • ~~user rbi (again, replace the name of the factoid) — this is the preferred way now.

You do not need to use tell or the new form when telling yourself about a factoid; simply just do ~rbi.

Can I private message javabot?

Yes, in fact if you’re going to repeatedly use javabot, we recommend it. In private message, no tilde or ~ is needed. The tilde is intended to keep javabot from repeatedly responded to all of the messages in the channel.

How do I address javabot?

  • use the tilde ~

Example: ~javadoc String.split(*)

  • address the bot directly

Example: javabot javadoc String.split(*)

What is the default database used by javabot?

The default database is HSQLDB. This is the simplest out of the box configuration. But the configuration is easy to change to use another database. The bot has been run on both postgresql and mysql as well. Persistence is managed by JPA so virtually any database with a JDBC driver and JPA dialect should work.

Who wrote javabot?

Ricky Clarkson originally wrote it. Since then, evanchooly has been the main developer. A full, hopefully more accurate list can be found here.

What framework does javabot use?

Javabot uses PircBot for its backend.

Can you put javabot in my channel?

If your channel is on freenode, then it’s a possibility. Ask and see. Alternatively, you can build the source and run your own bot. You can find the source at project page.