2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-20 20:43:23 +00:00
Hilbish/docs/api/hilbish/hilbish.messages.md

2.8 KiB

title description layout menu
Module hilbish.messages simplistic message passing doc
docs
parent
API

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

|unreadCount()|Returns the amount of unread messages.| |readAll()|Marks all messages as read.| |send(message)|Sends a message.| |read(idx)|Marks a message at idx as read.| |delete(idx)|Deletes the message at idx.| |clear()|Deletes all messages.| |all()|Returns all messages.|


hilbish.messages.all()

Returns all messages.

Parameters

This function has no parameters.


hilbish.messages.clear()

Deletes all messages.

Parameters

This function has no parameters.


hilbish.messages.delete(idx)

Deletes the message at idx.

Parameters

idx number


hilbish.messages.read(idx)

Marks a message at idx as read.

Parameters

idx number


hilbish.messages.send(message)

Sends a message.

Parameters

message hilbish.message


hilbish.messages.readAll()

Marks all messages as read.

Parameters

This function has no parameters.


hilbish.messages.unreadCount()

Returns the amount of unread messages.

Parameters

This function has no parameters.