Added LDoc comments for new files, ready to merge pt. 2
This commit is contained in:
@ -256,8 +256,8 @@ function modpol.interactions.message(user, message)
|
||||
print(user .. ": " .. message)
|
||||
end
|
||||
|
||||
--- Function: modpol.interactions.message_user
|
||||
-- Gets and sends a message from one user to another
|
||||
--- Gets and sends a message from one user to another
|
||||
-- @function modpol.interactions.message_user
|
||||
-- @param sender Name of user sending (string)
|
||||
-- @param recipient Name of user receiving (string)
|
||||
function modpol.interactions.message_user(sender, recipient)
|
||||
@ -268,8 +268,9 @@ function modpol.interactions.message_user(sender, recipient)
|
||||
sel.." [from "..sender.."]")
|
||||
end
|
||||
|
||||
--- Function: modpol.interactions.display
|
||||
-- Displays complex data to a user
|
||||
|
||||
--- Displays complex data to a user
|
||||
-- @function modpol.interactions.display
|
||||
-- @param user Name of target user (string)
|
||||
-- @param title Title of display (string)
|
||||
-- @param message Content of message (string or table of strings)
|
||||
@ -301,7 +302,7 @@ function modpol.interactions.display(user, title, message, completion)
|
||||
end
|
||||
|
||||
|
||||
-- Applies "func" to user input
|
||||
--- Applies "func" to user input.
|
||||
-- Func input: user input (string)
|
||||
-- @function modpol.interactions.text_query
|
||||
-- @param User (string)
|
||||
@ -314,7 +315,7 @@ function modpol.interactions.text_query(user, query, func)
|
||||
end
|
||||
|
||||
--- Output: Calls func on choice.
|
||||
-- func input: choice (string)
|
||||
-- Func input: choice (string)
|
||||
-- @function modpol.interactions.dropdown_query
|
||||
-- @param user (string)
|
||||
-- @param label (string)
|
||||
@ -405,10 +406,12 @@ function modpol.interactions.checkbox_query(
|
||||
end
|
||||
|
||||
|
||||
-- Function: modpol.interactions.binary_poll_user
|
||||
-- Params: user (string), question (string), func (function)
|
||||
-- func input: user input (string: y/n)
|
||||
-- Output: Applies "func" to user input
|
||||
--- Output: Applies "func" to user input.
|
||||
-- Func input: user input (string: y/n)
|
||||
-- @function modpol.interactions.binary_poll_user
|
||||
-- @param user (string)
|
||||
-- @param question (string)
|
||||
-- @param func (function)
|
||||
function modpol.interactions.binary_poll_user(user, question, func)
|
||||
local query = "Poll for " .. user .. " (y/n): ".. question
|
||||
local answer
|
||||
@ -435,7 +438,6 @@ end
|
||||
-- @param initiator (string)
|
||||
-- @param org (number or string)
|
||||
-- @param message (string)
|
||||
|
||||
function modpol.interactions.message_org(initiator, org, message)
|
||||
local this_org = modpol.orgs.get_org(org)
|
||||
local users = this_org:list_members()
|
||||
|
Reference in New Issue
Block a user