39 lines
903 B
Lua
39 lines
903 B
Lua
--- 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
|