Code Monkey home page Code Monkey logo

oakbot's Introduction

OakBot

codecov.io

OakBot is a chat bot for Stack Overflow Chat that's written in Java. It is named after the first name given to the Java programming language before it became "Java".

OakBot is most active in the Java and Java and Android era chat rooms.

Requirements

  • Java 1.8
  • Maven (for building)

Build Instructions

To build the project, run the command below.

mvn package

This command will build the project and package it into an executable, shaded JAR. A shaded JAR file contains all of the project's dependencies. The shaded JAR file is saved here: target/OakBot-VERSION.jar.

Deploy Instructions

  1. Copy the following files to the server. Put them in the same directory:
    1. target/OakBot-VERSION.jar: The executable, shaded JAR file that contains OakBot's code and dependencies.
    2. bot.properties: This file contains configuration data, such as the bot's login credentials. A sample file is located in the root of this project.
    3. logging.properties (optional): The configuration file for the Java Logging API. A sample file is located in the root of this project.
  2. Run OakBot: java -jar OakBot-VERSION.jar &
    1. The "&" at the end of the command launches the program in the background. This is useful if you are logged into a server remotely and need to logout after launching OakBot.

db.json

This is the file OakBot uses to persist information, such as how many commands it has responded to and what rooms it has joined. It is located in the bot's working directory. The file will automatically be created if it doesn't exist.

bot.properties

Contains various configuration settings for the bot. Open the sample "bot.properties" file at the root of this project for a description of each setting.

OakBot must be restarted if any of these settings are changed while OakBot is running.

Adding/Removing Commands

To add a command, create an instance of the Command interface and add it to the bot in the main method.

CLI Arguments

Argument Description
--settings=PATH The properties file that contains the bot's configuration settings, such as login credentials (defaults to "bot.properties").
--db=PATH The path to a JSON file for storing all persistant data (defaults to "db.json").
--quiet If specified, the bot will not output a greeting message when it starts up.
--version Prints the version of this program.
--help Prints descriptions of each argument.

Questions/Feedback

One way to reach me is in Stack Overflow's Java chat room. Please mention my name (@Michael) so I will see your message.

You can also submit bug reports and feature requests to the issue tracker.

oakbot's People

Contributors

mangstadt avatar abhinayagarwal avatar unihedro avatar

Watchers

James Cloos avatar Satriyo Aji Nugroho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.