Added message_org module

This commit is contained in:
Nathan Schneider
2021-12-20 20:34:11 -07:00
parent 75f3a80d31
commit fe2d5fdb2a
3 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,38 @@
--- message_org
-- @module message_org
local message_org = {
name = "Message org",
slug = "message_org",
desc = "Send a message to all members of the org",
hide = false;
}
message_org.data = {
}
message_org.config = {
}
-- @function initiate
function message_org:initiate(result)
modpol.interactions.text_query(
self.initiator, "Message to all org members: ",
function(input)
local message = self.initiator.." to org "..
self.org.name..": "..input
if input and input ~= "" then
modpol.interactions.message_org(
self.initiator, self.org.id, message)
end
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
end
)
if result then result() end
self.org:delete_process(self.id)
end
--- (Required) Add to module table
modpol.modules.message_org = message_org