View on GitHub

LynxBot

A Twitch.tv IRC bot for Old School Runescape

Download this project as a .zip file Download this project as a tar.gz file

responses.json(4)
- LynxBot manual

DESCRIPTION

responses.json is the file which holds all of LynxBot's automated responses.

As there is no command to manage them, all automated responses are added and modified via editing this file.

Each response is an object within the responses array.

SYNOPSIS

The format of each response object is as follows:

{
        "name" : "not enough",
        "regex" : "how ?(much|many|often)",
        "response" : "not enough.",
        "cooldown" : 15
}
name

A unique identifier for the response (used to track its cooldown).

regex

The pattern to search for.

This is a regular expression. If that is too complex, any simple word or phrase is a valid regular expression.

The regex in the above example matches the word how followed by an optional space and one of the words much, many or often.

As this is a JSON string, all backslashes in the regex must be escaped (i.e. use \\ instead of \.

response

The text to post when the pattern is found.

All responses are prefaced by "@nick, ", where nick is the name of the person who posted the message that triggered the response.

cooldown

The cooldown, in seconds, of the response.

SEE ALSO

Automated Responses(3)