Clone this wiki locally
- 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.
- Karma Rankings
- For channel logs for just choose the channel from the list on the left-hand side.
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
- 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.
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.
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
Do ~info rbi replacing rbi with the name of the factoid you’d like to know about.
- 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.
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.
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.
- use the tilde ~
Example: ~javadoc String.split(*)
- address the bot directly
Example: javabot javadoc String.split(*)
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.
Javabot uses PircBot for its backend.
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.