--- Remove org (consent) -- A simple module that calls a consent process on an org to remove it. -- Depends on the Consent module. local remove_org_consent = { name = "Remove this org", slug = "remove_org_consent", desc = "Removes an org if all members consent." } remove_org_consent.data = { } remove_org_consent.config = { } function remove_org_consent:initiate() self.org:call_module( "consent", self.initiator, { prompt = "Remove org " .. self.org.name .. "?", votes_required = #self.org.members }, function () self:complete() end ) end function remove_org_consent:complete() modpol.interactions.message_org( self.initiator, self.org.id, "Removing org: " .. self.org.name) self.org:delete() modpol.interactions.dashboard(self.initiator) end modpol.modules.remove_org_consent = remove_org_consent