Skip to content

Repository files navigation

CircleCI

Room15Bot

This is a bot solely for room 15 on Stack Overflow chat.

It currently depends on ChatExchange for listening to chat events.

Usage

Commands are prefixed with !. Commands are only recognized when they are at the start of a message. Commands are case insensitive, however their arguments might not be.

Available commands are listed below. Some require an elevated access level.

Commands for all users

NameFormatExampleDescription
Status!status!statusDisplay a status message
Stats me!stats!statsShows your stats
Stats user!stats <user id>!stats 1Shows a user's stats
Stars any!stars!starsShows the most starred messages of the room
Stars week!stars weekShows the most starred messages of the room of the past week
Stars month!stars monthShows the most starred messages of the room of the past month
Stars user!stars <user name>!stars johnShows a user's most starred messages
Remind me!remindme <future date expression>!remindme 2hSets a reminder. When it expires, the bot will ping you
!remindme in 5 mins
Adam!adam!adamFinds lost things
Mauker!mauker!maukerMocks Mauker
Ahmad!ahmad!ahmadAsks Ahmad about anything
Benz!🚗!🚗All
Dave!dave!daveCreates realistic simulation of interacting with Dave

Commands for room owners

NameFormatExampleDescription
Accept user!accept <user name>!accept johnPosts a welcome message for the user and grants him write access
!accept!acceptAccepts the most recent user to request access
Reject user!reject <user name>!reject johnPosts a rejection message for the user and clears his access
!reject!rejectRejects the most recent user to request access

Command for bot owners

NameFormatExampleDescription
Stop bot!leave!leaveStops the bot
Sync stars data!syncstars!syncstarsSynchronizes all starred messages data

Access levels do not overlap. I.e. a bot owner is not necessarily a room owner.

For more detailed information on how each command is processed, what input it will take and what aliases it has, you can check its UseCase here. For more detailed information on what constitutes a command you can check its pattern in the CommandParser.

Running

A config.properties file must be located in the root of the project with values for at least the following properties:

# Bot
botemail=
botpassword=
# Database
dbuser=
dbpassword=
dburl=
dbdriver=

When running tests locally, this file must also include the following properties:

dburltest=

Database

Exposed is used as database framework. You are not tied to a specific database type, however it must be one that Exposed supports.

Make sure that

  • you are connecting to a valid database (via the config in the file above). Note that tests use a different database. You should create both.
  • if you want to use a database/jdbc driver that is not mariadb, update the driver dependency in build.gradle.

The bot will create the required tables and populate them (if applicable) for you.

A test database will be provided in the future to ease this process if you just want to test stuff.

About

A bot that mainly revolves around automating common administrative tasks

Topics

Resources

Stars

13 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages