Lua-Logo.png

Detox for Lua

Requires Lua v5.2 and above

 

Quick Start Guide

Before starting, download the latest Detox data file.


Import the detox module, load data files, and initialize the Moderator object:

local Detox = require "detox"

-- Fetch Detox data file and parse JSON - see download page of data file for examples
local detoxData = ...

-- Initialize Moderator and we're good to go!
local moderator = Detox.Moderator.new(detoxData)
local message = "Welcome to Detox!"
local results = moderator:isToxic(message)

For more details, see our Overview documentation guide.