Notice

Purpose

Notices are mostly sent whenever the runtime gets around to it. This is great for some purposes, but messes up deliberate line breaks. For messages that must be in order, this module implements a queue. This queue is also useful if the same message needs to be sent to multiple people. Furthermore cb.sendNotice() is not the best structured function; both send() and sendGroup() exist as wrappers around it to simplify it. The equivalent post() and postGroup() work the same way, but with the buffer.

Use

There is both help() and tryParse() that can be tied into the app or bot

Most of the functionality is on the programmer side however. Generally speaking, this is a dependency of other modules

Interface

color

This is the default color of all notices. Generally speaking, a bot has a theme where most notices are a particular color. This is nothing more than a convenience; any special colors should be declared with the notice.

add()

Add the string parameters to the buffer, to be printed later.

apply()

Add the emblem to each line in the buffer. This could be done manually through string concatenation, but this is convenient.

clear()

Clear the buffer of all lines.

post()

Post, or print, all lines in the buffer as notices to chat. This function has many parameters for setting: a specific user, otherwise the whole room; a font color, otherwise the default; a font weight, otherwise bold; whether to clear the buffer after posting, otherwise save it.

postGroup()

This works exactly like post() except instead of an optional user, there is a mandatory group. The lines in the buffer are sent to the entire group at once.

send()

This works exactly like post() except instead of using the buffer, there is a mandatory message that must be declared. This is a convenient wrapper around cb.sendNotice().

sendGroup()

This works exactly like postGroup() except instead of using the buffer, there is a mandatory message that must be declared. This is a convenient wrapper around cb.sendNotice().

Requirements