Rotater

Purpose

Oftentimes, something should be said over and over to the room. Examples are advertising where videos are sold, ones twitter account, room rules, etc. This module provides and manages rotating notices

Use

There is both help() and tryParse() that can be tied into the app or bot. These provide commands for working with the rotater, such as adding new messages, or removing them.

If one or more will regularly be in rotation, it is recommended they be added in the initialization code.

Interface

lapse

This is the duration, in minutes, between each notice within the rotater. 3 minutes seems to be a good amount for the typical case. More notices should probably have a shorter lapse. Less notices should probably have a longer lapse.

add()

Add the message to the rotater. The message will be posted automatically when the cursor gets to it.

del()

Delete a notice from the rotater. This may be passed as the literal message to find and remove, or it may be a number signifying the index within the rotater, 1-based.

list()

Get a list of all notices in the rotater. Each string in the list is a single notice.

start()

Start the rotater. This must be called for the rotater to work. Otherwise, nothing will ever be posted. It is recommended this is started at initialization time, even if no notices have been added.

Requires