Skip to content
Socratic_Phoenix edited this page Nov 13, 2017 · 2 revisions

TIOBot Setup

Prerequisites:

  • Java 8

Startup:

Use the java command to startup the bot, like so: java -jar TIOBot.jar <dir>. <dir> is an argument for the bot which represents the config directory. You may also run java -jar TIOBot.jar <dir> silent to prevent TIOBot from sending the "TIOBot logging in!" message to each room it joins.

Config:

The config directory must contain a config.json. The bot also uses this directory to save a rooms.json, where it stores aliases and permissions. The config must contain two keys email and password. These must be the email and password of the account you want TIOBot to use. The config may also contain a joins key, which is an object containing at most three keys, STACK_EXCHANGE, STACK_OVERFLOW, and STACK_EXCHANGE_META. Each of theses keys represents a chat "platform" in the stack exchange network. The value for each of these must be an array of integers, each integer is an id of a room the bot should join on that network. For example, the below config auto-joins the sandbox room:

{
    "email": "socraticphoenix@gmail.com",
    "password": "notmyrealpassword",
    "joins": {
        "STACK_EXCHANGE": [1]
    }
}

Command Line Commands:

  • join <network> <room> joins a room with the given id, and network is any of [STACK_EXCHANGE, STACK_OVERFLOW, STACK_EXCHANGE_META]
  • autojoin <network> <room> joins a room with the given id and adds it to the list of auto-joins
  • leave <network> <room> leaves a room with the given id, and network is any of [STACK_EXCHANGE, STACK_OVERFLOW, STACK_EXCHANGE_META]
  • autoleave <network> <room> leaves a room with the given id and removes it from the list of auto-joins
  • exit logs out of all rooms and saves data
  • exit silent logs out of all rooms and saves data, without sending a "TIOBot logging off!" message to those rooms
Clone this wiki locally