Module hilbish.messages

simplistic message passing

Introduction#

The messages interface defines a way for Hilbish-integrated commands, user config and other tasks to send notifications to alert the user.z The hilbish.message type is a table with the following keys: title (string): A title for the message notification. text (string): The contents of the message. channel (string): States the origin of the message, hilbish.* is reserved for Hilbish tasks. summary (string): A short summary of the text. icon (string): Unicode (preferably standard emoji) icon for the message notification read (boolean): Whether the full message has been read or not.

Functions#


all#

hilbish.messages.all() -> table<hilbish.message>

Returns all messages.

Parameters#

This function has no parameters.


clear#

hilbish.messages.clear()

Deletes all messages.

Parameters#

This function has no parameters.


delete#

hilbish.messages.delete(idx)

Deletes the message at idx.

Parameters#

number idx


read#

hilbish.messages.read(idx)

Marks a message at idx as read.

Parameters#

number idx


readAll#

hilbish.messages.readAll()

Marks all messages as read.

Parameters#

This function has no parameters.


send#

hilbish.messages.send(message)

Sends a message.

Parameters#

hilbish.message message


unreadCount#

hilbish.messages.unreadCount() -> integer

Returns the amount of unread messages.

Parameters#

This function has no parameters.