MessageService
Noir.Services.MessageService: NoirService
A service for storing, accessing and sending messages.
Load all saved messages.
Used internally.
Insert a value into a table, removing the first value if the table is full.
Used internally.
Parameters
tbl
: tablevalue
: anylimit
: integer
Register a message.
Used internally.
Parameters
title
: stringcontent
: stringauthor
: NoirPlayer|nilisAddon
: booleansentAt
: number|nilrecipient
: NoirPlayer|nilfireEvent
: boolean|nil
Returns
NoirMessage
Save a message.
Used internally.
Parameters
message
: NoirMessage
Send a message to a player or all players.
Parameters
player
: NoirPlayer|nil - nil = everyonetitle
: stringcontent
: string...
: any
Returns
NoirMessage
Returns all messages sent by a player.
Parameters
player
: NoirPlayer
Returns
table<integer, NoirMessage>
Returns all messages.
Earliest entries in table = Oldest messages
Parameters
copy
: boolean|nil - Whether or not to copy the table (recommended), but may be slow
Returns
table<integer, NoirMessage>
Last updated