Counters Module

Allows creating and managing incrementable counters.

Configuration

counters.descriptions

These are descriptions for each counter in map, which should be managed via !addcounter and !removecounter.

counters.map

This is a map of counters, which should be managed via !addcounter and !removecounter.

AddCounter

!addcounter <name> [initial value] [description]

Creates a new counter with an initial value and description that can be incremented with the !increment command, or decremented with the !decrement command.

name

A short name for the counter. Quotes are required if it has spaces.

initial value

(optional) A number to start the counter at. If omitted, defaults to 0.

description

(optional) The string echoed by Sweetie Bot when the counter is incremented or decremented. Defaults to [counter] is at %%, where %% is replaced by the counter value. If the string doesn't contain %% it pastes the value of the counter on the end.

RemoveCounter

!removecounter <name>

Deletes the counter with the given name.

name

Name of the counter to delete.

Counter

!counter [name]

Returns the value of a counter, or a list of counters if no name is provided.

name

(optional) Name of the counter to display.

Increment

!increment <name>

Increments a counter by 1 and returns the new value.

name

Name of the counter to increment.

Decrement

!decrement <name>

Decrements a counter by 1 and returns the new value.

name

Name of the counter to decrement.