Further implementation of nested functions in interactions, including in consent module

This commit is contained in:
Nathan Schneider
2021-07-31 17:11:26 -06:00
parent 74263b252b
commit 4e10d74bff
3 changed files with 66 additions and 40 deletions
+13
View File
@@ -172,3 +172,16 @@ function modpol.interactions.binary_poll_user(user, question, func)
modpol.interactions.message(user, "Error: invalid response")
end
end
-- COMPLEX INTERACTIONS
-- ====================
-- Function: modpol.interactions.message_org
-- input: initiator (string), org_id (number), message (string)
-- output: broadcasts message to all org members
-- Function: modpol.interactions.binary_poll_org
-- input: initator (user string), org_id (number)
-- output: gets question from initiator, asks all org members, broadcasts answers