doc updates

This commit is contained in:
VorTechnix 2024-10-16 12:04:20 -07:00
parent 112364e767
commit 41577de416
No known key found for this signature in database
GPG Key ID: 091E91A69545D5BA

@ -80,8 +80,8 @@ setmetatable(Notify, {__call = call})
-- @param string name The name of the player to send the notification to. -- @param string name The name of the player to send the notification to.
-- @param string ntype The type of notification. -- @param string ntype The type of notification.
-- @param string message The message to send. -- @param string message The message to send.
-- @param string colour optional): The colour of the notification. -- @param string? colour Optional. The colour of the notification.
-- @param message_coloured boolean? Optional. Whether the message should be coloured. -- @param boolean? message_coloured Optional. Whether the message should be coloured.
-- @return boolean True if all parameters are valid, false otherwise. -- @return boolean True if all parameters are valid, false otherwise.
-- @example Predefined notification types -- @example Predefined notification types
-- Notify.custom(name, "custom", "This one is magenta!", "#FF00FF", true) -- Notify.custom(name, "custom", "This one is magenta!", "#FF00FF", true)
@ -115,10 +115,10 @@ do
end end
--- Local suppression status handler --- Local suppression status handler
-- - @param name <string>: The name of the player to check. -- @param string name The name of the player to check.
-- - @param suppress <table>: The table of suppressed players. -- @param table suppress The table of suppressed players.
-- - @return <boolean>: True if the player is not suppressed or -- @return boolean True if the player is not suppressed or
-- - - if the player is clear(ed), false otherwise. -- if the player is clear(ed), false otherwise.
local check_clear_suppressed = function(name, suppress) local check_clear_suppressed = function(name, suppress)
if suppress[name] then if suppress[name] then
if type(suppress[name]) == "function" then return false end if type(suppress[name]) == "function" then return false end
@ -130,9 +130,9 @@ local check_clear_suppressed = function(name, suppress)
end end
--- Suppress a player's notifications. --- Suppress a player's notifications.
-- - @param name <string>: The name of the player to suppress. -- @param string name The name of the player to suppress.
-- - @param time <number > 1>: The number of seconds to suppress notifications for. -- @param number > 1 time The number of seconds to suppress notifications for.
-- - - number < 1 immediately removes the suppression. -- number < 1 immediately removes the suppression.
function Notify.suppress_for_player(name, time) function Notify.suppress_for_player(name, time)
local suppress = globalstate.suppress local suppress = globalstate.suppress
-- If the player is already suppressed, cancel it unless it's a function -- If the player is already suppressed, cancel it unless it's a function